#15706: Graph built from their edges are simple by default
-------------------------------------+-------------------------------------
       Reporter:  ncohen             |        Owner:
           Type:  enhancement        |       Status:  positive_review
       Priority:  major              |    Milestone:  sage-6.4
      Component:  graph theory       |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Nathann Cohen      |    Reviewers:  Dima Pasechnik
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  public/ticket/15706                |  7c69f250922b0373de62e16b16baaab7f8b2fd32
   Dependencies:  #15704             |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by ncohen):

 Besides, just for your own information:

 {{{
 sage: g = Graph()
 sage: edges = list(combinations(range(1000),2))
 sage: %time g.add_edges(edges)
 CPU times: user 992 ms, sys: 44 ms, total: 1.04 s
 Wall time: 989 ms
 sage: g = Graph()
 sage: %time for e in edges: g.add_edge(e)
 CPU times: user 1.8 s, sys: 44 ms, total: 1.84 s
 Wall time: 1.79 s
 }}}

 This, because `add_edge(u,v)`, `add_edge(u,v,l)`, `add_edge((u,v))`,
 `add_edge((u,v,l))` are all valid, and that deciding which should be used
 takes time, at each `add_edge` call.

 Nathann

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