On 27/09/15 13:57, Nathann Cohen wrote:
So I would create a similar function for the category of AdditiveSemigroups
called additive_cayley_graph() to avoid any ambiguity and keeps with our
convention that (semi)groups without "additive" are treated as
multiplicative.

I see. Then I have two questions:

- Isn't it a bit wrong to have .cayley_graph() and
.additive_cayley_graph()? Shouldn't we deprecate '.cayley_graph()` and
have .multiplicative_cayley_graph() and .additive_cayley_graph()
instead? (or cayley_graph_multiplicative/additive for
list-comprehension)
>
- Should we duplicate the code and replace * with +, or is there
something cleaner?

We can possibly have a function

def cayley_graph(set, generators, operator)

where the input is

  - set: an iterable of elements
  - generators: the generating set to use
  - operator(x,y): the group product of x and y

Instead of set, one can have only a seed.

That function would be called from both methods...

Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to