#13250: Additional poset examples
---------------------------------+------------------------------
       Reporter:  csar           |         Owner:  sage-combinat
           Type:  enhancement    |        Status:  needs_review
       Priority:  major          |     Milestone:  sage-5.11
      Component:  combinatorics  |    Resolution:
       Keywords:  sd40           |     Merged in:
        Authors:                 |     Reviewers:
Report Upstream:  N/A            |   Work issues:
         Branch:                 |  Dependencies:
       Stopgaps:                 |
---------------------------------+------------------------------

Comment (by csar):

 Replying to [comment:4 ncohen]:
 > Hellooooooooooooo !!
 >
 > Two comments :
 > * You can use in the code of `PartitionsDominanceOrder` the same trick
 that you used in `SetPartitions` : instead of defining `dominance_leq` you
 can directly return
 > {{{
 > Poset([Partitions(n),Partition.dominates])
 > }}}
 >

 Oops. I've changed that.

 > * Could you add an INPUT section to the docstrings of all functions ? It
 is in particular impossible right now to guess what the `"labels"`
 argument of `SymmetricGroupAbsoluteOrderPoset` can accept as an input, and
 what the result would be. I do not understand what this `n<10` constraint
 does either.
 >
 I've added INPUT sections to the docstrings (for the functions I added--
 did you mean all the example posets functions?). It occurs to me that
 maybe I should change the arguments called `lam` to `mu` or something. I'm
 assuming Python would be unhappy with an argument called `lambda`, but
 perhaps `lam` doesn't convey much meaning to people who aren't me.
 Thoughts?

 I put the `n<10` constraint in `SymmetricGroupAbsoluteOrderPoset` because
 `SymmetricGroupWeakOrderPoset` has one. I don't know of a, uh, structural
 reason for this constraint, in the sense that some code somewhere needs
 it. I suspect actually computing these posets for `n=10` might be overly
 taxing time or memory-wise.

 > And a question too... Do you have any idea what "mro" does inside of
 posets ? `O_o`
 >
 > {{{
 > sage: posets.mro??
 > Error getting source: <built-in method mro of
 sage.misc.classcall_metaclass.ClasscallMetaclass object at 0x4533aa0> is
 not a module, class, method, function, traceback, frame, or code object
 > Type:       builtin_function_or_method
 > String Form:<built-in method mro of
 sage.misc.classcall_metaclass.ClasscallMetaclass object at 0x4533aa0>
 > Docstring:  mro() -> list return a type's method resolution order
 > sage:
 > }}}
 >
 > I do not see where it is imported there, but I don't get why it should
 `O_o`
 >
 I'm not totally sure what you mean, so I might be about to say things you
 know. My rough understanding is that `mro` is a method that all classes
 have (so it wouldn't get imported) that returns a list telling you what
 precedence the classes it inherited form have when looking for functions
 (i.e. if it inherited `foo` from two different classes, which `foo`
 wins?). But `Posets` doesn't actually inherit from any other classes
 (well, besides `object`), so `Posets.mro()` is returning
 `[sage.combinat.posets.poset_examples.Posets, object]`, which maybe isn't
 that interesting.

--
Ticket URL: <http://trac.sagemath.org/ticket/13250#comment:5>
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/groups/opt_out.


Reply via email to