We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45ea549 commit 8c968b0Copy full SHA for 8c968b0
networking_flow/dinic.py
@@ -97,20 +97,6 @@ def dfs(self, u: int, sink: int, flow: int, ptr: list) -> int:
97
def max_flow(self, source: int, sink: int) -> int:
98
"""
99
Computes the maximum flow from source to sink.
100
-
101
- >>> dinic = Dinic(6)
102
- >>> dinic.add_edge(0, 1, 16)
103
- >>> dinic.add_edge(0, 2, 13)
104
- >>> dinic.add_edge(1, 2, 10)
105
- >>> dinic.add_edge(1, 3, 12)
106
- >>> dinic.add_edge(2, 1, 4)
107
- >>> dinic.add_edge(2, 4, 14)
108
- >>> dinic.add_edge(3, 2, 9)
109
- >>> dinic.add_edge(3, 5, 20)
110
- >>> dinic.add_edge(4, 3, 7)
111
- >>> dinic.add_edge(4, 5, 4)
112
- >>> dinic.max_flow(0, 5)
113
- 23
114
115
max_f = 0
116
# While we can build a Level Graph (source can reach sink)
@@ -127,9 +113,6 @@ def max_flow(self, source: int, sink: int) -> int:
127
128
129
if __name__ == "__main__":
130
- import doctest
131
132
- doctest.testmod()
133
dn = Dinic(6)
134
117
edges = [
135
118
(0, 1, 16),
0 commit comments