#15706: Graph built from their edges are simple by default
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  ncohen                 |       Status:  needs_review
           Type:         |    Milestone:  sage-6.2
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:  graph  |    Reviewers:
  theory                 |  Work issues:
       Keywords:         |       Commit:
        Authors:         |  fdbf92b364b0fb0a69307abaf792be21d8403ef1
  Nathann Cohen          |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  u/ncohen/15706         |
   Dependencies:         |
  #15704                 |
-------------------------+-------------------------------------------------
Changes (by ncohen):

 * cc: vdelecrois (added)


Old description:

> The `Graph/DiGraph` constructor are scary to look at, and waste a lot of
> computations in order to guess whether the user wants loops or multiple
> edges. In order to reduce this number of tests and make those functions
> more efficient, we can change the default and force the user to specify
> explicitly what they want to obtain.
>
> Note that this is not a bad idea on its own, for graphs which allow
> multiple edges/loops behave differently with respect to the `add_edge`
> function, and by specifying this explicitly the user is forced to be
> aware of what is going to happen next.
>
> After many small patches like that, it may become possible to simplify a
> lot of things in those huge constructors. But first, deprecation for one
> year `T_T`
>
> Nathann

New description:

 The `Graph/DiGraph` constructor are scary to look at, and waste a lot of
 computations in order to guess whether the user wants loops or multiple
 edges. In order to reduce this number of tests and make those functions
 more efficient, we can change the default and force the user to specify
 explicitly what they want to obtain.

 Note that this is not a bad idea on its own, for graphs which allow
 multiple edges/loops behave differently with respect to the `add_edge`
 function, and by specifying this explicitly the user is forced to be aware
 of what is going to happen next.

 After many small patches like that, it may become possible to simplify a
 lot of things in those huge constructors. But first, deprecation for one
 year `T_T`

 Nathann

 (example of why this could be useful https://groups.google.com/d/topic
 /sage-support/4ffCepWrjDc/discussion)

--

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