summaryrefslogtreecommitdiff
path: root/networkx/algorithms/flow/tests/test_maxflow.py
diff options
context:
space:
mode:
Diffstat (limited to 'networkx/algorithms/flow/tests/test_maxflow.py')
-rw-r--r--networkx/algorithms/flow/tests/test_maxflow.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/networkx/algorithms/flow/tests/test_maxflow.py b/networkx/algorithms/flow/tests/test_maxflow.py
index 36bc5ec7..b8e985c3 100644
--- a/networkx/algorithms/flow/tests/test_maxflow.py
+++ b/networkx/algorithms/flow/tests/test_maxflow.py
@@ -539,11 +539,20 @@ class TestCutoff:
assert k <= R.graph["flow_value"] <= (2 * k)
R = edmonds_karp(G, "s", "t", cutoff=k)
assert k <= R.graph["flow_value"] <= (2 * k)
+ R = dinitz(G, "s", "t", cutoff=k)
+ assert k <= R.graph["flow_value"] <= (2 * k)
+ R = boykov_kolmogorov(G, "s", "t", cutoff=k)
+ assert k <= R.graph["flow_value"] <= (2 * k)
def test_complete_graph_cutoff(self):
G = nx.complete_graph(5)
nx.set_edge_attributes(G, {(u, v): 1 for u, v in G.edges()}, "capacity")
- for flow_func in [shortest_augmenting_path, edmonds_karp]:
+ for flow_func in [
+ shortest_augmenting_path,
+ edmonds_karp,
+ dinitz,
+ boykov_kolmogorov,
+ ]:
for cutoff in [3, 2, 1]:
result = nx.maximum_flow_value(
G, 0, 4, flow_func=flow_func, cutoff=cutoff