diff options
author | Arafat <arafat.da.khan@gmail.com> | 2016-01-07 22:36:55 +0530 |
---|---|---|
committer | Arafat <arafat.da.khan@gmail.com> | 2016-01-07 22:36:55 +0530 |
commit | 9e57e547d89630ae55da5d1b846f29586ccebc46 (patch) | |
tree | eaff4371fafc8603e731ddf78bacd7b573dbb7a2 | |
parent | 399fec8b80bf49e2ea90126b8598863897c01570 (diff) | |
download | networkx-9e57e547d89630ae55da5d1b846f29586ccebc46.tar.gz |
Fixes #1812
-rw-r--r-- | networkx/algorithms/connectivity/cuts.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/networkx/algorithms/connectivity/cuts.py b/networkx/algorithms/connectivity/cuts.py index 763a8e4a..0288f5e2 100644 --- a/networkx/algorithms/connectivity/cuts.py +++ b/networkx/algorithms/connectivity/cuts.py @@ -285,7 +285,8 @@ def minimum_st_node_cut(G, s, t, flow_func=None, auxiliary=None, residual=None): mapping = H.graph.get('mapping', None) if mapping is None: raise nx.NetworkXError('Invalid auxiliary digraph.') - + if G.has_edge(s, t) or G.has_edge(t, s): + return [] kwargs = dict(flow_func=flow_func, residual=residual, auxiliary=H) # The edge cut in the auxiliary digraph corresponds to the node cut in the |