#16470: Add optional distance in BFS
-------------------------------------+-------------------------------------
Reporter: foosterhof | Owner:
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-6.3
Component: graph theory | Resolution:
Keywords: breadth first | Merged in:
search distance | Reviewers:
Authors: | Work issues:
Report Upstream: Reported | Commit:
upstream. No feedback yet. | c0dd8ff023c173451a4126f0b1742eb16692f2db
Branch: | Stopgaps:
u/foosterhof/ticket/16470 |
Dependencies: |
-------------------------------------+-------------------------------------
Changes (by foosterhof):
* status: new => needs_review
* commit: => c0dd8ff023c173451a4126f0b1742eb16692f2db
* upstream: N/A => Reported upstream. No feedback yet.
Comment:
I need BFS to report the distance as well, the minimum number of
edges/arcs to be traversed for every vertex. The shortest_paths method
implements this, but it does not have any option to specify a neighbor
function, which is possible in the breadth_first_search method.
My commit is a small modification that does implement this.
----
New commits:
||[http://git.sagemath.org/sage.git/commit/?id=c0dd8ff023c173451a4126f0b1742eb16692f2db
c0dd8ff]||{{{Added optional argument (default False) to report distance
along with vertex}}}||
--
Ticket URL: <http://trac.sagemath.org/ticket/16470#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.