#13440: Adding reverse_edge() function to DiGraph
---------------------------------+------------------------------------------
Reporter: egunawan | Owner: jason, ncohen, rlm
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-5.7
Component: graph theory | Resolution:
Keywords: digraph | Work issues:
Report Upstream: N/A | Reviewers: Gregg Musiker
Authors: Emily Gunawan | Merged in:
Dependencies: | Stopgaps:
---------------------------------+------------------------------------------
Comment (by egunawan):
Hi David,
To clarify my questions:[[BR]]1. Inside reverse_edge() and reverse_edges()
methods, should the input digraph be set to multiedges=true by
default?[[BR]]2. Should there be an optional parameter for whether these
methods will set the input digraph to allow multiple edges? So maybe it
would look like reverse_edge(self, u, v=None, label=None, inplace=False,
change_to_allow_multiedges=False)[[BR]][[BR]] If !``self!`` does
not allow multiple edges (such as the following example),[[BR]]
then function currently will delete the input edge::[[BR]]
[[BR]] sage: D = !DiGraph( [(1,2), (2,1)] )[[BR]]
sage: D.edges()[[BR]] [(1, 2, None), (2, 1,
None)][[BR]] sage: re = D.reverse_edge(1,2) [[BR]]
sage: re.edges()[[BR]] [(2, 1, None)][[BR]][[BR]]Thank you
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13440#comment:25>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.