Opened 7 years ago
Closed 6 years ago
#13919 closed defect (fixed)
Bug in Graph() when input is a weighted matrix
Reported by: | ncohen | Owned by: | jason, ncohen, rlm |
---|---|---|---|
Priority: | major | Milestone: | sage-5.7 |
Component: | graph theory | Keywords: | |
Cc: | chapoton | Merged in: | sage-5.7.beta1 |
Authors: | Nathann Cohen | Reviewers: | Frédéric Chapoton |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
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
Attachments (1)
Change History (7)
comment:1 Changed 7 years ago by
- Status changed from new to needs_review
comment:2 Changed 6 years ago by
Changed 6 years ago by
comment:4 Changed 6 years ago by
- Status changed from needs_review to positive_review
ok, let it go. Positive review !
comment:5 Changed 6 years ago by
- Milestone changed from sage-5.6 to sage-5.7
- Reviewers set to Frédéric Chapoton
comment:6 Changed 6 years ago by
- Merged in set to sage-5.7.beta1
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
Please correct the failing doctest, otherwise it's ok