Skip to content

Commit

Permalink
Update src/sage/matroids/graphic_matroid.pyx
Browse files Browse the repository at this point in the history
Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
  • Loading branch information
gmou3 and tscrim authored May 5, 2024
1 parent bb2c71e commit 9fda0f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sage/matroids/graphic_matroid.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -708,11 +708,12 @@ cdef class GraphicMatroid(Matroid):
[0, 4, 5]
"""
cdef set XX = set(X)
cdef frozenset Y = self.groundset().difference(XX)
cdef frozenset Y = self._groundset.difference(XX)
cdef list edgelist = self._groundset_to_edges(Y)
cdef GenericGraph_pyx g = self._subgraph_from_set(XX)
cdef list V = g.vertices(sort=False)
cdef int components = g.connected_components_number()
cdef tuple e
for e in edgelist:
# a non-loop edge is in the closure iff both its vertices are
# in the induced subgraph, and the edge doesn't connect components
Expand Down

0 comments on commit 9fda0f7

Please sign in to comment.