We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9db6994 commit ea5d281Copy full SHA for ea5d281
1 file changed
bafna.py
@@ -78,8 +78,7 @@ def get_fvs(og_G):
78
while len(stack) > 0:
79
node = stack.pop()
80
sg = nx.subgraph_view(og_G, filter_node=lambda n: n not in F or n == node)
81
- # With this check, it should ensure that each call for nx.is_forest is in O(|V|) time since |E| < |V|
82
- if sg.number_of_edges() <= sg.number_of_nodes() - 1 and nx.is_forest(sg):
+ if nx.is_forest(sg):
83
F.remove(node)
84
85
return F
0 commit comments