From ecb10c3286a2647891a93c53775b2586966548a7 Mon Sep 17 00:00:00 2001 From: Almog-David Date: Fri, 2 Aug 2024 18:45:51 +0300 Subject: [PATCH] fixed problem with doctest regarding create_st_graph --- networkz/algorithms/approximation/firefighter_problem/Utils.py | 2 +- networkz/algorithms/max_flow_with_node_capacity.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/networkz/algorithms/approximation/firefighter_problem/Utils.py b/networkz/algorithms/approximation/firefighter_problem/Utils.py index 97ad797..c62ce68 100644 --- a/networkz/algorithms/approximation/firefighter_problem/Utils.py +++ b/networkz/algorithms/approximation/firefighter_problem/Utils.py @@ -521,7 +521,7 @@ def create_st_graph(graph:nx.DiGraph, targets:list, new_target:str) -> nx.DiGrap >>> G = nx.DiGraph() >>> G.add_edges_from([(1, 2), (2, 3), (3, 4)]) >>> targets = [2, 3] - >>> G_st = create_st_graph(G, targets) + >>> G_st = create_st_graph(G, targets, 't') >>> 't' in G_st.nodes True >>> list(G_st.successors(2)) diff --git a/networkz/algorithms/max_flow_with_node_capacity.py b/networkz/algorithms/max_flow_with_node_capacity.py index c88625e..89997a1 100644 --- a/networkz/algorithms/max_flow_with_node_capacity.py +++ b/networkz/algorithms/max_flow_with_node_capacity.py @@ -69,7 +69,7 @@ def min_cut_with_node_capacity(graph: nx.DiGraph, source: int = None, target: in >>> G.add_edge(0, 2) >>> G.add_edge(2, 3) >>> G.add_edge(1, 4) - >>> s_t_G = create_st_graph(G, [2,4]) + >>> s_t_G = create_st_graph(G, [2,4], 't') >>> min_cut_nodes = min_cut_with_node_capacity(s_t_G, 0, 4) >>> sorted(min_cut_nodes) ['2_out', '4_out']