#18347: implement the shard intersection order on permutations
-------------------------+-------------------------------------------------
Reporter: | Owner:
chapoton | Status: needs_work
Type: | Milestone: sage-6.7
enhancement | Resolution:
Priority: minor | Merged in:
Component: | Reviewers:
combinatorics | Work issues:
Keywords: poset | Commit:
Authors: | 878ed3a0794d123c46d7cb9ea48ad93ca2d07348
Frédéric Chapoton | Stopgaps:
Report Upstream: N/A |
Branch: |
u/chapoton/18347 |
Dependencies: |
-------------------------+-------------------------------------------------
Comment (by chapoton):
Hello
> What does `connected_parts` is doing in the git branch?
Well, I removed it. Could go in another ticket maybe.
> 1. it would be better if it inherits from `tuple` (i.e. remove the `p`
attribute and add `tuple.__init__(self, p)` in the constructor). Then
remove the `__hash__` and the `__repr__` (they are already fine in
`tuple`)
Done
> 2. Implement the various operators `__le__`, `__lt__`, `__gt__`,
`__ge__` and check that it is coherent (this should be ok for `__eq__` and
`__ne__` inherited from `tuple`)
Is this really necessary ? This class is just there to help build the
poset, there is no way
it will be ever used for something else, I think.
> 3. Moreover, in `__le__` you can not assume that `self` and `other` are
of the same type. You should start the method with something like:
> {{{
> if type(self) is not type(other) or len(self) != len(other):
> raise TypeError("these are not comparable")
> }}}
Done
> 4. Do you want to keep all attributes of `ShardPosetElement` public as
they are?
Once again, this class will probably not be very much used. So I do not
see the point to hide things.
My motivation for this ticket was to have the poset, which is the main
interesting thing here.
Thanks for your comments, by the way.
Frederic
--
Ticket URL: <http://trac.sagemath.org/ticket/18347#comment:19>
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.