MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / add_edge

Method add_edge

graphs/dinic.py:17–19  ·  view source on GitHub ↗
(self, a, b, c, rcap=0)

Source from the content-addressed store, hash-verified

15 """
16
17 def add_edge(self, a, b, c, rcap=0):
18 self.adj[a].append([b, len(self.adj[b]), c, 0])
19 self.adj[b].append([a, len(self.adj[a]) - 1, rcap, 0])
20
21 # This is a sample depth first search to be used at max_flow
22 def depth_first_search(self, vertex, sink, flow):

Callers 1

dinic.pyFile · 0.45

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected