#16395: adjacency_matrix raises error for large multigraphs
-----------------------+--------------------------------
  Reporter:  lipshitz  |             Type:  defect
    Status:  new       |         Priority:  minor
 Milestone:  sage-6.3  |        Component:  graph theory
Resolution:            |  Report Upstream:  N/A
-----------------------+--------------------------------
 For G a graph, G.adjacency_matrix() calls G.density() to decide whether
 to use a dense or sparse matrix. G.density() raises a TypeError if G is a
 multigraph. This is silly.

 To witness the problem, try:
 sage: G = Graph([(i,i+1) for i in range(500)]+[(0,1),], multiedges=True)
 sage: G.adjacency_matrix()

 The revised code tries density and, if that raises a TypeError, defaults
 to a dense matrix. (So, if someone extends density, this code
 automatically improves.)

--
Ticket URL: <http://trac.sagemath.org/ticket/16395>
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.

Reply via email to