#19586: Add is_cayley_graph
-------------------------------------+-------------------------------------
       Reporter:  jaanos             |        Owner:
           Type:  enhancement        |       Status:  needs_review
       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:                     |  4aaf3014fee5bb08d861636908d6733047d4a869
  u/jaanos/add_is_cayley_graph       |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by dimpase):

 Replying to [comment:35 jaanos]:
 >
 > > only the generators? Why? it's one quick function call away from the
 group, why would you
 > > do this in library code? In particular, as you are computing the
 group, not its generators, in the first place.
 >
 > Well, I think if we're giving the user the choice of what they want
 returned, it would be unreasonable to forbid a certain choice just because
 we see no use for it.

 it's an unreasonable code bloat to include a special function for anything
 that is
 a trivial one-liner; e.g. if you start returning the generators, you might
 be tempted to add a function that only returns the number of generators,
 etc etc :-)

 And you are not depriving the user from getting what he wants in any way
 by not providing
 an option for any trivial one-liner applied to the return value, not at
 all..

 IMHO it's also against the spirit of OOP to have an option in a function
 `f` to return either `X` or `X.blah()`; the user can call `.blah()` on the
 answer he gets himself; and `X` is already created in `f`, there is no
 performance gain in returning X.blah() instead of `X`.

--
Ticket URL: <http://trac.sagemath.org/ticket/19586#comment:36>
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.

Reply via email to