#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):
> Okay, I'll let Dima take the fall if users complain ;-) Seriously, I
hope this leads to less confusion in the long-run for people who like both
multigraphs and simple ones; I just didn't want to make that UI decision.
Well. Regardless of changing the default to "always simple", it is already
good that `add_edge` will become consistent with the constructor.
> I do have one question that probably has an answer of "yes"; are there
still enough examples of graphs not in the extremely cryptic/hermetic
dictionary of dictionary notation? I noticed you changed quite a few of
the dict of lists ones, and I had never seen that other constructor
before.
I changed dicts to lists ? Can you tell me where ?
The dictionary notation is only cryptic when you want "edge-labelled
multigraphs". When you want simple graphs, it is rather simple: associate
to each vertex the list of its neighbors.
To answer your question a bit more completely: I hope that Sage (the code,
not the doctests) contains no occurrence of `Graph(list_of_edges)`, for
this is slower than `g=Graph();g.add_edges(list_of_edges)`. This is also
the point of this ticket: making both equally fast.
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/15706#comment:43>
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.