#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:         |  e32ecc3a9702cc7ab69ba180eb75f02623418186
  Frédéric Chapoton      |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  u/chapoton/18347       |
   Dependencies:         |
-------------------------+-------------------------------------------------

Comment (by vdelecroix):

 Replying to [comment:8 chapoton]:
 > Thanks for the comments. I have corrected the two minor ones.
 >
 > About the caching: indeed, this is used only in the poset, but used many
 times.

 It is currently not used '''in''' the poset, only during its construction!
 Just have a look at the ugly poset code. It is not lazy at all.

 4. `runs` and `decreasing_runs` should return the same data. It is
 currently list for one of them and tuple for the other.

 5. Why did you wrote the following comment in `shard_compares`?
 {{{
 # We assume that r1 has less runs than r0
 }}}

 6. The function `shard_preorder_graph` only depends on the interval not on
 the runs themselves. So you are storing too much in the cache of this
 function. Make the input a tuple of pairs
 {{{
 sage: s = Permutation([2,8,3,9,6,4,5,1,7])
 sage: runs = s.decreasing_runs()
 sage: shard_preorder_graph(runs) == \
 ....:    shard_preorder_graph(tuple((r[0],r[-1]) for r in runs))
 True
 }}}
   And you should really think moving it somewhere else as this has nothing
 to do with permutations. This is just a comparability graph given by the
 inclusion order on intervals. Isn't it?

 Vincent

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