#17367: Classes of combinatorial structures
-------------------------------------+-------------------------------------
       Reporter:  elixyre            |        Owner:
           Type:  enhancement        |       Status:  needs_info
       Priority:  major              |    Milestone:  sage-6.9
      Component:  combinatorics      |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Jean-Baptiste      |    Reviewers:
  Priez                              |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  445ba61616c80b73c1f4ca6383d95e93ea6a2165
  u/elixyre/class_of_combinatorial_structures|     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by elixyre):

 Replying to [comment:22 zabrocki]:
 > I think you cheated a little bit with your implementation on
 `Compositions`.  On master I see:
 > {{{
 > sage: Compositions(3)([4,1])
 > ...
 > ValueError: [4, 1] not in Compositions of 3
 > }}}
 > On this branch
 > {{{
 > sage: Compositions(3)([4,1])
 > [4, 1]
 > }}}
 > You can see why, because you overwrote the `_element_constructor_`
 method in `Compositions_n` and made it a little too simple.  I tried to do
 a similar change on `Partitions` and I was getting doc test failures for
 not having a `grade` in certain classes.  Maybe we can talk about if it is
 possible to make this a little easier to implement on particular classes.

 I have fixed that:
 {{{
 sage: Compositions(3)([4,1])
 Traceback (most recent call last):
 ...
 ValueError: `[4, 1]` should be an element of Compositions of 3
 }}}

 Replying to [comment:21 elixyre]:
 > Replying to [comment:20 vdelecroix]:
 > > [...]
 > > When we will converge to something reasonable, it would be better to
 split the features:
 > >  - a ticket to implement being subset of a parent (i.e. the `ambient`
 method)
 > >  - a ticket to implement the category restrictions on the slices
 > >  - etc
 > >
 > > The most important is to actually '''not''' focus on your particular
 case if you want to implement something useful for categories.
 >
 > Please, could you provide this splitting and propose some code to start?
 (I'm lost in the sage maze... show me the line)

 Vincent, could you take some time to answer us your plan about this
 ticket?

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