Skip to content

Commit b8fdab8

Browse files
committed
updated connected components parameter
1 parent b7c274e commit b8fdab8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sage/graphs/matching_covered_graph.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2066,7 +2066,7 @@ def maximal_barrier(self, vertex):
20662066
`v` is the end of that edge in `V(K)`, then `M \cap E(K)` is a perfect
20672067
matching of `K - v`::
20682068
2069-
sage: K = J.subgraph(vertices=(J.connected_components())[0])
2069+
sage: K = J.subgraph(vertices=(J.connected_components(sort=True))[0])
20702070
sage: # Let F := \partial_G(K) and T := M \cap F
20712071
sage: F = [edge for edge in G.edge_iterator()
20722072
....: if (edge[0] in K and edge[1] not in K)
@@ -2090,7 +2090,7 @@ def maximal_barrier(self, vertex):
20902090
`G - B` is factor critical::
20912091
20922092
sage: all((K.subgraph(vertices=connected_component)).is_factor_critical()
2093-
....: for connected_component in K.connected_components()
2093+
....: for connected_component in K.connected_components(sort=True)
20942094
....: )
20952095
True
20962096
@@ -2876,7 +2876,7 @@ def is_brick(self, coNP_certificate=False):
28762876
# Let K be a nontrivial odd component of H := G - B. Note that
28772877
# there exists at least one such K since G is nonbipartite
28782878
nontrivial_odd_component = next(
2879-
(component for component in H.connected_components()
2879+
(component for component in H.connected_components(sort=True)
28802880
if len(component) % 2 and len(component) > 1), None
28812881
)
28822882

@@ -2920,7 +2920,7 @@ def is_brick(self, coNP_certificate=False):
29202920
H.delete_vertices(two_vertex_cut)
29212921

29222922
# Check if all components of H are odd
2923-
components = H.connected_components()
2923+
components = H.connected_components(sort=True)
29242924

29252925
# Find a nontrivial odd component
29262926
if all(len(c) % 2 for c in components):

0 commit comments

Comments
 (0)