Skip to content

Commit

Permalink
added doctests for _subgraph_by_adding()
Browse files Browse the repository at this point in the history
  • Loading branch information
janmenjayap committed Nov 5, 2024
1 parent 6a68edf commit abb1b56
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/sage/graphs/matching_covered_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,14 @@ def _subgraph_by_adding(self, vertices=None, edges=None, edge_property=None, imm
True
sage: H.is_immutable()
True
sage: C = graphs.CubeplexGraph()
sage: D = MatchingCoveredGraph(C)
sage: I = D._subgraph_by_adding(immutable=True)
sage: (I == D) and (I.is_immutable())
True
sage: J = D._subgraph_by_adding(vertices=D.vertices(), immutable=True)
sage: (J == D) and (J.is_immutable())
True
An error is thrown if the subgraph is not matching covered::
Expand Down

0 comments on commit abb1b56

Please sign in to comment.