Skip to content

Commit

Permalink
fix doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
erelsgl committed Jul 9, 2024
1 parent ac576e4 commit 2ef6676
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def max_flow_with_node_capacity(graph: nx.DiGraph, source: int = None, target: i
>>> G.add_edge(1, 4)
>>> s_t_G = create_st_graph(G, [2,4])
>>> min_cut_nodes = max_flow_with_node_capacity(s_t_G, 0, 4)
{'2_out', '4_out'}
>>> sorted(min_cut_nodes)
['2_out', '4_out']
"""
logger.info("Starting graph flow reduction")
H = nx.DiGraph()
Expand Down Expand Up @@ -104,9 +105,7 @@ def max_flow_with_node_capacity(graph: nx.DiGraph, source: int = None, target: i
min_cut_nodes = algo.minimum_st_node_cut(H, f'{source}_out', 't_in')

logger.info(f"Minimum Cut is: {min_cut_nodes}")

print(set(sorted(min_cut_nodes)))


return min_cut_nodes

if __name__ == "__main__":
Expand Down

0 comments on commit 2ef6676

Please sign in to comment.