Skip to content

Commit

Permalink
fixed problem with doctest regarding create_st_graph
Browse files Browse the repository at this point in the history
  • Loading branch information
Almog-David committed Aug 2, 2024
1 parent 4b413b6 commit ecb10c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion networkz/algorithms/max_flow_with_node_capacity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down

0 comments on commit ecb10c3

Please sign in to comment.