Re: [sage-combinat-devel] import statement strange behaviour
On Mon, May 21, 2012 at 10:12:16PM +0200, Vincent Delecroix wrote: I really don't know how we can obtain the name used inside the function. I doubt one could even do it: in f(x) the parameter x is evaluated before passing it down to the function f. Potential workarounds: - Accept things as they are: that's just a corner case, it's easy for the user to fix the name after the import - Accept strings like cached_method as input as well as names for those cases - Find some heuristic for those cases (usually the lower case is preferred to the upper case?) Anyway, we should not waste too much time on that. Thanks all for your feedback! Cheers, Nicolas -- Nicolas M. ThiƩry Isil nthi...@users.sf.net http://Nicolas.Thiery.name/ -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To post to this group, send email to sage-combinat-devel@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
Re: [sage-combinat-devel] bug in poset
Hi Anne, Did you make the changes in the source code? Then you can just do sage -br Thanks - I got that wrong (thought this is what upgrade would do)! and test your function. If you are happy with your changes and want to put them under mercurial supervision do hg qnew rank-dg.patch hg qrefresh hg qcommit Hmm. I can't get this to work: darij@travis-virtualbox:~/sage-5.0.rc1$ hg qnew rank-dg.patch abort: requirement 'dotencode' not supported! darij@travis-virtualbox:~/sage-5.0.rc1$ ./sage -hg qnew rank-dg.patch darij@travis-virtualbox:~/sage-5.0.rc1$ ./sage -hg qrefresh darij@travis-virtualbox:~/sage-5.0.rc1$ ./sage -hg qcommit abort: no queue repository Best regards, Darij -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To post to this group, send email to sage-combinat-devel@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
Re: [sage-combinat-devel] bug in poset
Hello Anne, Darij, On Tue, May 22, 2012 at 2:50 PM, Darij Grinberg darijgrinb...@gmail.comwrote: Hi Anne, For a finite poset perhaps the easiest would be to - start with a random element in the poset, assign rank 0 - look at all covers and cocovers and assign the rank according to the recurrence rank(x) = rank(y) + 1 if x covers y. - repeat with the new elements - if at any point an element is reached again and is assigned a different value from before, the poset is not graded; otherwise continue with new elements Add some constant to all ranks, so that the minimal rank is 0. You are right - I was trying to apply algebra too eagerly. This is basically a Dijkstra algorithm. Darij, do you think you can implement this? Here's a stupid implementation: http://mit.edu/~darij/www/rf.txt (to replace the rank_function implementation in sage/combinat/posets/hasse-diagram.py). Unfortunately I couldn't really test it in context since I have no idea how to make Sage recognize my changes to the sourcecode. (./sage -combinat upgrade notices the change but wants me to qrefresh, whatever this means; I haven't yet got around to learning hg.) I have checked that, when applied to a poset's Hasse diagram, it gives the right results. I created a ticket for this: http://trac.sagemath.org/sage_trac/ticket/12993 I'm going to post some comments for Darij there. Franco -- -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To post to this group, send email to sage-combinat-devel@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
Re: [sage-combinat-devel] bug in poset
Hi Darij, Did you make the changes in the source code? Then you can just do sage -br Thanks - I got that wrong (thought this is what upgrade would do)! and test your function. If you are happy with your changes and want to put them under mercurial supervision do hg qnew rank-dg.patch hg qrefresh hg qcommit Hmm. I can't get this to work: darij@travis-virtualbox:~/sage-5.0.rc1$ hg qnew rank-dg.patch abort: requirement 'dotencode' not supported! darij@travis-virtualbox:~/sage-5.0.rc1$ ./sage -hg qnew rank-dg.patch darij@travis-virtualbox:~/sage-5.0.rc1$ ./sage -hg qrefresh darij@travis-virtualbox:~/sage-5.0.rc1$ ./sage -hg qcommit abort: no queue repository Do you have the sage-combinat queue installed? You should do that (before changing the sage source code) via sage -combinat install There is a lot of information here http://wiki.sagemath.org/combinat/MercurialStepByStep Best, Anne -- You received this message because you are subscribed to the Google Groups sage-combinat-devel group. To post to this group, send email to sage-combinat-devel@googlegroups.com. To unsubscribe from this group, send email to sage-combinat-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.