#16395: adjacency_matrix raises error for large multigraphs
-------------------------------------+-------------------------------------
       Reporter:  lipshitz           |        Owner:
           Type:  defect             |       Status:  needs_work
       Priority:  minor              |    Milestone:  sage-6.3
      Component:  graph theory       |   Resolution:
       Keywords:                     |    Merged in:
        Authors:                     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/lipshitz/ticket/16395            |  c1e702c8e65ca6b2b3c3f8f6cbd093ff40ea4145
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by ncohen):

 * status:  needs_review => needs_work


Comment:

 Why this double if/else ? All you have to do is replace
 {{{
 if n <= 256 or self.density() > 0.05:
 }}}

 with that

 {{{
 if n <= 256 or self.has_multiple_edges() or self.density() > 0.05:
 }}}

 You can also write that if you prefer :

 {{{
 if (n <= 256 or
     self.has_multiple_edges() or
     self.density() > 0.05):
 }}}

 Nathann

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