Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a bug in matching() #13402

Closed
dimpase opened this issue Aug 26, 2012 · 6 comments
Closed

a bug in matching() #13402

dimpase opened this issue Aug 26, 2012 · 6 comments

Comments

@dimpase
Copy link
Member

dimpase commented Aug 26, 2012

see "Bug in Graph.matching" thread on sage-devel:

sage: sage: g = graphs.PathGraph(3) # an unweighted graph                                                                                  
sage: sage: g.matching(value_only=True, use_edge_labels=True)                                                            
1.0
sage: sage: g.matching(value_only=True, use_edge_labels=False)                                                                   
2

as mentioned there, the bug is in the line return Integer(len(d)) near line 6786 in sage/graphs/generic_graph.py.

It should be return Integer(len(d)/2)

CC: @nathanncohen @jasongrout

Component: graph theory

Author: Dmitrii Pasechnik

Reviewer: David Coudert

Merged: sage-5.3.rc1

Issue created by migration from https://trac.sagemath.org/ticket/13402

@dimpase
Copy link
Member Author

dimpase commented Aug 26, 2012

comment:1

Attachment: 13402.patch.gz

@dimpase dimpase modified the milestones: sage-5.4, sage-5.3 Aug 26, 2012
@dcoudert
Copy link
Contributor

Reviewer: David Coudert

@dcoudert
Copy link
Contributor

comment:2

The patch is working properly for me, so I give positive review.

@ppurka
Copy link
Member

ppurka commented Aug 27, 2012

comment:3

Maybe add the example given in the description as a doctest?

@jdemeyer
Copy link

Author: Dmitrii Pasechnik

@jdemeyer
Copy link

Merged: sage-5.3.rc1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants