#19586: Add is_cayley_graph
-------------------------------------+-------------------------------------
Reporter: jaanos | Owner:
Type: enhancement | Status: needs_info
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: | fbff6b8e22c419beef4a5d991c00d5c512a933f9
u/jaanos/add_is_cayley_graph | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Changes (by jaanos):
* status: new => needs_info
Comment:
Hi!
> > * Should the method be called `is_cayley_graph`, or just `is_cayley`?
>
> We have 'is_perfect', 'is_chordal', 'is_cartesian_product', so I'd vote
for 'is_cayley'.
OK, will change.
> > Now, I guess that maybe this doesn't really belong in
`generic_graph.py`. But maybe we could have a method in
`PermutationGroup_generic` which checks for the existence of such a group
(and have it returned if requested)?
>
> Do you know how such a function could be named? Having 'nice and natural
name' for this function would rule out the alternative of having a 'hidden
helper function' for this code.
Maybe `has_transitive_subgroup(order = None, certificate = False)`? By
default, it would just tell whether the group itself is transitive;
otherwise, a subgroup of given order would be looked for (and returned if
`certificate` is `True`).
> > * I should probably check whether the function works correctly with
graphs with loops and multigraphs (my instinct says yes for the former and
no for the latter).
>
> You are not 'forced' to make it work in those cases. If it is
complicated or if you do not want to deal with those cases, you should
look at 'scream_if_not_simple'. It happens very often throughout the
graph/ code.
I don't think it will be too complicated, I just haven't thought about it
when coding. But thanks for the info, it is certainly useful to know about
this option.
> > * Can we have Unicode characters in the docstrings?
>
> We can, and you can add this directive to the top of the file if you
need to. Now, I am not really a big fan of adding a name every time one
adds a function. That's just me, and perhaps some others. We already have
'git blame' to figure out who wrote a function, and having in each
function the names of all people who ever touched it could quickly grow
out of hands. And I personally don't see the added value, and I personally
don't want to see Sage's source code turn out into a way to advertise its
developers.
>
> I added 'personally' everywhere to insist that it is my view, and that
other developers have different opinions. By our customs, you are totally
allowed to add your name in an author block if you want to.
OK, I will remove my name (indeed, I had copied the docstring of one of
your functions, so the author field was there) - I am certainly not
claiming to have invented this algorithm:)
> Thanks for adding this function,
No problem!
Janoš
--
Ticket URL: <http://trac.sagemath.org/ticket/19586#comment:4>
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.