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

Bug in Graph() when input is a weighted matrix #13919

Closed
nathanncohen mannequin opened this issue Jan 7, 2013 · 6 comments
Closed

Bug in Graph() when input is a weighted matrix #13919

nathanncohen mannequin opened this issue Jan 7, 2013 · 6 comments

Comments

@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Jan 7, 2013

As reported in [1], the following code produces an exception :

sage: B = {0:{1:2,2:5,3:4},1:{2:2,4:7},2:{3:1,4:4,5:3},3:{5:4},4:{5:1,6:5},5:{6:7}} 
sage: grafo3 = Graph(B,weighted=True) 
sage: matad = grafo3.weighted_adjacency_matrix() 
sage: grafo4 = Graph(matad,format = "adjacency_matrix", weighted=True) 
sage: grafo4.shortest_path(0,6,by_weight=True)

This, because Sage has some problems understanding that the graph is not a multigraph...

[1] https://groups.google.com/forum/?fromgroups=#!topic/sage-support/rIpMl1u7VXE

CC: @fchapoton

Component: graph theory

Author: Nathann Cohen

Reviewer: Frédéric Chapoton

Merged: sage-5.7.beta1

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

@nathanncohen nathanncohen mannequin added this to the sage-5.6 milestone Jan 7, 2013
@nathanncohen nathanncohen mannequin added the s: needs review label Jan 7, 2013
@fchapoton
Copy link
Contributor

comment:2

Please correct the failing doctest, otherwise it's ok

@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented Jan 23, 2013

Attachment: trac_13919.patch.gz

@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented Jan 23, 2013

comment:3

Updated !

Nathann

@fchapoton
Copy link
Contributor

comment:4

ok, let it go. Positive review !

@jdemeyer
Copy link

Reviewer: Frédéric Chapoton

@jdemeyer jdemeyer modified the milestones: sage-5.6, sage-5.7 Jan 24, 2013
@jdemeyer
Copy link

Merged: sage-5.7.beta1

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

3 participants