#15428: Partitions to posets
-------------------------------------------------+-------------------------
       Reporter:  darij                          |        Owner:
           Type:  enhancement                    |       Status:
       Priority:  major                          |  needs_work
      Component:  combinatorics                  |    Milestone:  sage-5.13
       Keywords:  sage-combinat, partition,      |   Resolution:
  poset                                          |    Merged in:
        Authors:  Darij Grinberg                 |    Reviewers:  Travis
Report Upstream:  N/A                            |  Scrimshaw
         Branch:                                 |  Work issues:
   Dependencies:  #15350                         |       Commit:
                                                 |     Stopgaps:
-------------------------------------------------+-------------------------

Comment (by nthiery):

 Replying to [comment:16 darij]:
 > I've renamed the methods and made the standard orientation the first
 example.

 Thanks. Maybe you could use SE rather than NW as well in the documentation
 when you explain what the poset is about.

 > About the DRYness, what exactly would you factor out? What do you mean
 by "indexing" rows and columns?

 Oh, now I see the misunderstanding; I thought the option was about the
 indexing of the cells, ... Which indeed was stupid (same poset). Never
 mind.

 To make your code DRY, you could build two lists horizontal_covers and
 vertical_covers, then, depending on the options, map a reverse on them:
 {{{
 if ...:
     horizontal_covers = [ (j,i) for (i,j) in horizontal_covers ]
 if ...:
     vertical_covers = [ (j,i) for (i,j) in vertical_covers ]
 }}}


 > About the `orientation` keyword, I can replace it by two booleans
 > `left_is_bigger` and `top_is_bigger`. What do you think about it?
 > (Haven't done this change so far.)

 For consistency, I would tend to favor non boolean options like
 horiz="left" / "right" (we have a bunch of them e.g. in the Coxeter
 code). But I don't have great suggestions for the option names
 themselves.

 Cheers,
                       Nicolas

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