#19586: Add is_cayley_graph
-------------------------------------+-------------------------------------
Reporter: jaanos | Owner:
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.10
Component: graph theory | Resolution:
Keywords: Cayley graphs | Merged in:
groups | Reviewers:
Authors: Janoš Vidali | Work issues:
Report Upstream: N/A | Commit:
Branch: | baba4a8d4919be000984d40f56db542557c55e51
u/jaanos/add_is_cayley_graph | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by jaanos):
Hi!
> Is there any reason why you don't create an empty digraph and add the
necessary edges? I first thought that you were trying to avoid
distinguishing graph and digraph, but then I wondered what the label would
be on an *unlabeled* edge. `u/v` or `v/u`? Seems better to always use a
digraph, doesn't it?
I guess this would be doable, but then other properties would also have to
be set, which means duplicating the `copy` code. So essentially this is
what the current code is doing. But then again maybe we should be happy
with just copying what we really need.
As for graphs vs. digraphs, I prefer returning a graph which is actually
isomorphic to the original one. Of course, the resulting digraph could
always be converted to an undirected graph, but if the original graph has
multiedges, this conversion would double the edges.
For the labels on undirected edges, what I currently do is pick one label
and use it whenever its inverse could be used. Since vertices are
associated with group elements (via `set_vertices`), this does not appear
to be a problem.
Janoš
--
Ticket URL: <http://trac.sagemath.org/ticket/19586#comment:57>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.