#19737: SetPartition.to_permutation().cycle_tuples() is not the identity
-------------------------------------+-------------------------------------
       Reporter:  mantepse           |        Owner:
           Type:  defect             |       Status:  positive_review
       Priority:  major              |    Milestone:  sage-7.0
      Component:  combinatorics      |   Resolution:
       Keywords:  set partitions,    |    Merged in:
  permutations                       |    Reviewers:  Nathann Cohen
        Authors:  Martin Rubey       |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:  public/19737       |  dfc566694c1e841a13e6b9a7780e818d85cb4a1f
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by ncohen):

 * status:  needs_review => positive_review
 * commit:  c6a3939d2e18efe3906e1f959dc5c019c921a944 =>
     dfc566694c1e841a13e6b9a7780e818d85cb4a1f
 * branch:
u/mantepse/setpartition_to_permutation___cycle_tuples___is_not_the_identity
     => public/19737


Comment:

 Hellooooo,

 > For example, in Aldor I can simply say: if the parameters are the
 integers from 1 to n, then export the method "to_permutation" (i.e., make
 it visible to the user). Otherwise, do not export this method.

 Sounds hard to write documentation for something like that. To me it
 sounds like the other approach "Have every method available, but check
 that the data is what you expect before running the computation and raise
 a *clear* error message if it is not".

 You would have all methods available, some of which would raise an
 exception. Not ideal, but at least you don't wonder where the method is.
 Well, this being said I can totally hear that when one is used to this
 behaviour, one expects this kind of situation too.

 > OK, but you said you don't like {{{SetPartition}}} having methods that
 do not apply to all its instances.  Or would you prefer to type
 {{{IntegerSetPartition}}} all the time, and make {{{SetPartition([[1]])}}}
 and {{{IntegerSetPartition([[1]])}}} different objects?

 That's indeed how I would have implemented it. Two classes, one which
 inherits from the other.

 > I do not have proper access to git from this computer.  Your change is
 of course OK, so if you don't want to wait until tomorrow, please merge
 and set it to positive review.

 Done!

 Thanks,

 Nathann
 ----
 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=99e8d5f85849f08b73816cbfb989111f1d56bb92
 99e8d5f]||{{{trac #19737: Merged with 7.0.beta3}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=dfc566694c1e841a13e6b9a7780e818d85cb4a1f
 dfc5666]||{{{trac #19737: LaTeX formatting}}}||

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

Reply via email to