#12244: Empty graphs and new distance computations
-----------------------------+----------------------------------------------
Reporter: ncohen | Owner: jason, ncohen, rlm
Type: defect | Status: needs_work
Priority: major | Milestone: sage-5.0
Component: graph theory | Keywords:
Work_issues: | Upstream: N/A
Reviewer: David Coudert | Author: Nathann Cohen
Merged: | Dependencies:
-----------------------------+----------------------------------------------
Changes (by dcoudert):
* status: needs_review => needs_work
* reviewer: => David Coudert
Comment:
Hi Nathann,
The patch is OK but incomplete.
This is what is expected with your patch.
{{{
sage: G.shortest_path_all_pairs()
({}, {})
}}}
This is a missing part of your patch.
{{{
sage: G = Graph()
sage: G.distance_all_pairs()
---------------------------------------------------------------------------
ValueError Traceback (most recent call
last)
/path-to-sage/sage-4.8.alpha5/devel/sage-myclone/<ipython console> in
<module>()
/path-to-sage/sage-4.8.alpha5/local/lib/python2.6/site-
packages/sage/graphs/generic_graph.pyc in distance_all_pairs(self,
algorithm)
10574 elif algorithm == "Floyd-Warshall":
10575 from sage.graphs.distances_all_pairs import
floyd_warshall
> 10576 return floyd_warshall(self,paths = False, distances =
True)
10577
10578 else:
/path-to-sage/sage-4.8.alpha5/local/lib/python2.6/site-
packages/sage/graphs/distances_all_pairs.so in
sage.graphs.distances_all_pairs.floyd_warshall
(sage/graphs/distances_all_pairs.c:6711)()
ValueError: max() arg is an empty sequence
sage:
}}}
Happy new year ;-)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12244#comment:2>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.