MCPcopy Create free account
hub / github.com/THUDM/AgentBench / Graph

Class Graph

src/utils/max_flow.py:6–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4
5
6class Graph:
7 def __init__(self, node_count: int, edges: Dict[Tuple[int, int], int]):
8 """
9 edges: {(source, target): edge_weight}}
10 """
11 self.node_count = node_count
12 self.edges = edges
13
14 def iterate_edges(self) -> Iterable[Tuple[int, int, int]]:
15 for (source, target), weight in self.edges.items():
16 yield source, target, weight
17
18
19class Edge(BaseModel):

Callers 2

worker_generatorMethod · 0.85
max_flow.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected