Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Update tests and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
antonio-rojas committed Mar 14, 2022
1 parent 2a7fa3c commit 8452003
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/sage/graphs/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -4061,8 +4061,8 @@ def matching(self, value_only=False, algorithm="Edmonds",
OUTPUT:
- When ``value_only=False`` (default), this method returns the list of
edges of a maximum matching of `G`.
- When ``value_only=False`` (default), this method returns an
:class:`EdgesView` containing the edges of a maximum matching of `G`.
- When ``value_only=True``, this method returns the sum of the
weights (default: ``1``) of the edges of a maximum matching of `G`.
Expand Down Expand Up @@ -4118,7 +4118,10 @@ def matching(self, value_only=False, algorithm="Edmonds",
sage: edge_list = [(0,0,5), (0,1,1), (0,2,2), (0,3,3), (1,2,6)
....: , (1,2,3), (1,3,3), (2,3,3)]
sage: g = Graph(edge_list, loops=True, multiedges=True)
sage: sorted(g.matching(use_edge_labels=True))
sage: m = g.matching(use_edge_labels=True)
sage: type(m)
<class 'sage.graphs.views.EdgesView'>
sage: sorted(m)
[(0, 3, 3), (1, 2, 6)]
TESTS:
Expand Down

0 comments on commit 8452003

Please sign in to comment.