- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 636
Closed
Labels
Description
Steps To Reproduce
g = DiGraph([(1, 2)])
list(yen_k_shortest_simple_paths(g, 1, 1, report_edges=True, report_weight=True))
Expected Behavior
[(0, [])]
(returned value shoud have weight information)
Actual Behavior
[[]]
Additional Information
We may be able to solve issue by updating this part
sage/src/sage/graphs/path_enumeration.pyx
Line 743 in 9352a32
if source == target: |
to this code.
if source == target:
if report_weight:
if report_edges:
yield (0, [])
else:
yield (0, [source])
else:
if report_edges:
yield []
else:
yield [source]
return
Environment
- OS: macOS Sequioa 15.3.1
- Sage Version: 10.6
Checklist
- I have searched the existing issues for a bug report that matches the one I want to file, without success.I have read the documentation and troubleshoot guideTo pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
[-]<title> No weight information in calling `yen_k_shortest_simple_paths(v, v, report_edges=True, report_weight=True)`[/-][+]No weight information in calling `yen_k_shortest_simple_paths(v, v, report_edges=True, report_weight=True)`[/+]