Re: [sage-combinat-devel] Re: Super Module and Clifford Algebra

2016-04-21 Thread Florent Hivert
  Hi Travis,

> > in super_modules_with_basis.py, you hide the method 
> >_even_odd_on_basis 
> > As a minor consequence, there is a void ParentMethod class in the 
> > documentation. 
> > Except for very technical methods, the usage in categories is to have the 
> > on_basis (se eg: product_on_basis one_on_basis, coproduct_on_basis...) 
> > methods 
> > public, in particular because these are the methods that must be written. 
> >
> > Do you have a strong case for keeping _even_odd_on_basis private ? 
> >
> > Because it pollutes the namespace for the parent as it has no direct 
> bearing on the parent. For that reason, I (somewhat strongly) believe that 
> none of the *on_basis methods should be public. However, I am for 
> documenting its usage/importance in the category and/or examples. Yet in 
> either case, it is only useful for someone looking at the category 
> documentation, and I would say having more/better examples of category 
> implementations and thematic tutorials will improve the ease of new 
> implementations.

I'm very sensible to the namespace pollution question. However, as a user
(contrary to a developper) I'm using from time to time those methods directly
and I'm considering those as part of the public API. Indeed, its not uncommon
that calling one_on_basis or product_on_basis save you some time. And since I
value more consistency than small namespace, I'm in favor of having all
on_basis methods public.

Cheers,

Florent

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Super Module and Clifford Algebra

2016-04-06 Thread Florent Hivert
 Hi Travis, hi there,

Playing with the documentation I noticed a bunch of files whose documentation
is not inculded in the doc. So my first message is:

- for authors: when writing the new file, please remember to add it in the
  documentation
- for reviewer: please check that the documentation is in the index and read
  the sphinx compiled version.

Now a question for Travis:

in super_modules_with_basis.py, you hide the method
   _even_odd_on_basis
As a minor consequence, there is a void ParentMethod class in the documentation.
Except for very technical methods, the usage in categories is to have the
on_basis (se eg: product_on_basis one_on_basis, coproduct_on_basis...) methods
public, in particular because these are the methods that must be written.

Do you have a strong case for keeping _even_odd_on_basis private ?

Cheers,

Florent

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] ClonableIntArray

2016-03-14 Thread Florent Hivert
> but this returns the following type error:
> 
> TypeError: __init__() takes at least 2 positional arguments (1 given)
> 
> Probably I also want to have class MyElements_A, MyElements_B, ... that the 
> elements are automatically assigned to, but first I need to get the basic 
> structure working. It's a bit frustrating that I can't even get the bare 
> classes working...

Could you give the command that generate the error ?

On my computer I got a different error which should be explicit:

sage: MP = MyParent()
sage: MP([1,2,3])
NotImplementedError   Traceback (most recent call last)
...
NotImplementedError: this should never be called, please overload the check 
method

Cheers,

Florent

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] Patchbot's PluginFailed plugins.startup_modules failure

2015-12-17 Thread Florent Hivert
  Hi there,

Working on #13580 I'm getting a plugins.startup_modules failure. I don't
understand why, knowing that:

- the goal of this patch is to I create a new file namely
  sage/parallel/map_reduce.py whose main entry is the class RESetMapReduce.

- I'm *not importing* RESetMapReduce at Sage's top level.

- except for advanced use, it is supposed to be used through the
  map_reduce method of the class RecursivelyEnumeratedSets.

- it is lazily imported when called this method. More precisely the code is:

def map_reduce(self, [...]):
r"""
Apply a Map/Reduce algorithm on ``self``

[...]
"""
import sage.parallel.map_reduce
return sage.parallel.map_reduce.RESetMapReduce(
forest = self,
map_function = map_function,
reduce_function = reduce_function,
reduce_init = reduce_init).run()

So I'm not changing anything at Sage's startup, do I ?

What should I do to please the patchbot ?

Cheers,

Florent

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-combinat-devel] List of methods at beginning of files

2015-06-09 Thread Florent Hivert
  Hi Anne !

 Some of us at Sage Days 65 are looking at the long list of methods that exist
 for certain objects, for example in the Permutation
 
 http://doc.sagemath.org/html/en/reference/combinat/sage/combinat/permutation.html#sage-combinat-permutation
 
 We like the list, but it appears in some arbitrary order. Also, is it 
 maintained by hand? This seems pretty
 inconvenient since it will very quickly be out of order.
 
 Could this be automatized?

Yes ! I've made some experiment a long time ago. I basically copy pasted and
adapted sphinx autosummary extension. See 

   http://trac.sagemath.org/ticket/12878

However, at that time some people though that is was better to sort the list
of method thematically by hand. AS far as I remember it is also possible to
have both that is to put some tag say .. methodsummary in the doc to
activate the summary. So it's doable, it shouldn't be too difficult. The
question is to know exactly what we want to have.

Cheers,

Florent

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-combinat-devel] A great loss: Alain Lascoux passed away

2013-10-22 Thread Florent Hivert
  Dear Sage-Combinat developers

We have just learned that Alain Lascoux passed away last Saturday at
the age of 69. This is an immense loss for our community.

Among many other things, Alain was a continuous source of inspiration
when it came to creative computer exploration, and a funding
grand-father of Sage-Combinat. Indeed, even if he didn't write himself
a line of Python or MuPAD, he had piles of Maple code that he used
daily for his research, and was one of the strongest initiator and
supporter of the tradition of developing software for combinatorics in
Marne-la-Vallée (ACE, mu-EC, ...), which eventually gave birth to
Sage-Combinat.

We will deeply miss his knowledge, know-how, wit, kindness, and
friendship,

With great sadness,

best regards,
Florent and Nicolas

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/groups/opt_out.


[sage-combinat-devel] Re: Inverse of discrete functions

2013-09-26 Thread Florent Hivert
  Hello,

 I was just messing with dictionaries and lists, and I wonder if we
 could solve the problem once and for all with an inefficient generic
 solution. Here's the thing :
 
 I often have to define both a function, and its inverse. Something like :
 
 d = {
  'a' : 1,
  'b' : 2,
  'c' : 1,
  'd' : 3
 }
 
 Then, I want to find the list of all elements whose image is a 1, or
 2, or 3, and end up defining the following dictionary :
 
 d_inv = {
  1 : ['a','c'],
  2 : ['b'],
  3 : ['d']
 }
 
 Aand it would be sooo nice if there was a way to write d**(-1)[2],
 or something of the kind ! Did you ever write a code like this, and
 would you be interested by a generic tool for that ?
 
 Otherwise I'll just keep on computing the inverse of my dictionaries
 with a couple of Python lines ;-)

There is something liek that in finite_set_maps:

sage: sage.sets.finite_set_map_cy.fibers(d.get, d.keys())
{1: {'a', 'c'}, 2: {'b'}, 3: {'d'}}

Any suggestion to put it at a better place is welcome !

Cheers,

Florent

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [sage-combinat-devel] Terminated jobs on combinat server?

2013-06-18 Thread Florent Hivert
  Hi Andrew,

  I definitely didn't kill them, and the machine hasn't been rebooted in 
  2 months.  Your jobs might have used too much memory and been killed 
  by the Linux kernel. 
 
  Thanks William, that's probably what happened. I'll try and improve my 
 memory management!

I'm sorry your computation where stopped.

I have some extremely CPU intensive computations running on combinat. I
designed it to run on the CPU cache so that it needs very few memory: It
actually runs on 32 core but take less than a MB of memory. I'm watching it on
a regular basis and I remember seeing one of your code which had allocated
mode than 30 GB. If there were only one it shouldn't pose any problem on
combinat. However, there are some virtual machine running and several other
memory eating processes.

Cheers,

Florent

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-combinat-devel] Functorial constructions progress (hopefuly :-))

2013-06-05 Thread Florent Hivert
On Wed, Jun 05, 2013 at 11:40:29AM -0400, Franco Saliola wrote:
 Fantastic news, Nicolas! Thanks again for all your hard work on this!

+100 !!

 
 Franco
 
 --
 
 On Wed, Jun 5, 2013 at 10:59 AM, Anne Schilling a...@math.ucdavis.eduwrote:
 
  Hi Nicolas,
 
  It is great that you are making progress on these!
 
  Cheers,
 
  Anne
 
  On 6/4/13 8:04 PM, Nicolas M. Thiery wrote:
 Dear Sage-Combinat devs,
  
   Executive summary:
  
   - NCSF, QSym and their friends should finally work again with the
 Sage-Combinat queue applied; sorry it took so long.
  
   - The changes are relatively subtle; most test pass with 5.10.rc0 and
 those patches applied. But please report if you stumble on any
 abnormal behavior.
  
   Longer version:
  
   I am making progress on the functorial construction patch
   (#10963). Most of its dependencies are now positive review, and I have
   rebased it today on top of #13589: C3 under control and pushed on
   the Sage-Combinat queue: we should never be bitten again by the
   dreaded Cannot create a consistent method resolution order
   (MRO). Finally!
  
   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 unsubscribe from this group and stop receiving emails from it, send an
  email to sage-combinat-devel+unsubscr...@googlegroups.com.
  To post to this group, send email to sage-combinat-devel@googlegroups.com.
  Visit this group at
  http://groups.google.com/group/sage-combinat-devel?hl=en.
  For more options, visit https://groups.google.com/groups/opt_out.
 
 
 
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 sage-combinat-devel group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to sage-combinat-devel+unsubscr...@googlegroups.com.
 To post to this group, send email to sage-combinat-devel@googlegroups.com.
 Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.
 
 

-- 
Florent Hivert
  ---
   Il y a trois sortes de gens dans le monde : ceux qui savent compter et
ceux qui ne savent pas.
   There are three kinds of people in the world: those who can count,
and those who cannot.
  ---
Professeur, LRI, Univ. Paris Sud 11, CNRS.
Responsable Master 2 CCI
Bureau 33, Laboratoire de Recherche en Informatique (UMR CNRS 8623)
Bâtiment 650, Université Paris Sud 11, 91405 ORSAY CEDEX
Tél: 01-69-15-65-99
http://www.lri.fr/~hivert

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-combinat-devel] Wrong rebase...

2013-04-23 Thread Florent Hivert
  Dear Andrew,

During your last rebase you introduced the following lines in your patch:

   tableaux-combinatorics-am.patch:+del from tableau_tuple import 
TableauTuple, StandardTableauTuple, TableauTuples, StandardTableauTuples
   trac_Kleshchev-partitions-am.patch:+del from partition_tuple import 
PartitionTuple, PartitionTuples

This is probably due to some wrongly resolved conflict. I disabled temporarily
your patches with the guard +wrong_rebase. Can you resolve the problem or do
you need some help ?

Cheers,

Florent

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-combinat-devel] patches rebased

2013-04-22 Thread Florent Hivert
On Mon, Apr 22, 2013 at 07:44:57AM -0400, Nicolas M. Thiery wrote:
 On Mon, Apr 22, 2013 at 09:37:25AM +0200, Florent Hivert wrote:
  On Sun, Apr 21, 2013 at 08:04:45PM -0700, Travis Scrimshaw wrote:
   Hey,
  I had to rebase the functorial constructions patch as well in order to 
   get sage to start since LazyImport was not imported from Anne's rebase of 
   functional constructions (is this the NameError you get?).
  
  I also get a problem on 5.9.beta5 starting with
  
 trac_10963-more_functorial_constructions-nt.patch
  
  The error message can be found below.
 
 That's just a warning (about resolving lazy imports at Sage's
 startup), but sage starts normally after that, right?

So True ! I was scared by the message and didn't realize that this was in fact
a warning. Thanks !

Florent

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-combinat-devel] Mercurial refuses to access to combinat.sagemath.org

2013-04-09 Thread Florent Hivert
  Dear All,

I'm stuck on the following agravating problem: hg refuses to connect to
combinat:

popcorn-*oved/.hg/patches $ hg --debug pull -u
using http://combinat.sagemath.org/patches/
sending capabilities command
abort: error: Connection reset by peer

or

popcorn-/tmp $ hg --debug clone http://combinat.sagemath.org/patches/
using http://combinat.sagemath.org/patches/
sending capabilities command
abort: error: Connection reset by peer

I tried to
 - use sage or my distro's version of mercurial
 - remove my .hgrc
without any changes.

There is no problem accessing with my browser. At this point, I've no idea on
how to get more information on what's happening. Any suggestion ?

Cheers,

Florent

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-combinat-devel] Mercurial refuses to access to combinat.sagemath.org

2013-04-09 Thread Florent Hivert
On Tue, Apr 09, 2013 at 03:56:17PM -0400, Jordi Gutiérrez Hermoso wrote:
 On 9 April 2013 15:42, Florent Hivert florent.hiv...@lri.fr wrote:
  popcorn-*oved/.hg/patches $ hg --debug pull -u
  using http://combinat.sagemath.org/patches/
  sending capabilities command
  abort: error: Connection reset by peer
 
 connection reset by peer sounds like a problem with your connection
 to that server. I'm able to clone myself from that url.
 
 Is there a proxy in between you and combinat.sagemath.org, something
 that could be killing the connection?

Thanks ! This is exactly what was happening, but I was fooled by a colleague
for which it was working, and which didn't mention that he was working on a
remote machine by ssh. So I assumed that the problem was on my machine.

Cheers,

Florent

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-combinat-devel] import_statements and #12543

2013-01-26 Thread Florent Hivert
On Sat, Jan 26, 2013 at 04:22:27PM +0100, Nicolas M. Thiery wrote:
 On Sat, Jan 26, 2013 at 02:13:10PM +0100, Vincent Delecroix wrote:
  It is now a long time since the import_statements is in the queue
  (last discussion was [1] in May 2012) and I would like to move my
  patch (import_statements-vd.patch) to the trac server. Does anybody
  encounter some problems or have further suggestions ? Anne you own the
  ticket #12543 (opened in February 2012) and it seems that it is a good
  ticket to put the patch in. What do you think ?
 
 It's been working great for me. Let's get it in Sage!

+1

Florent

-- 
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.
Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-combinat-devel] Re: Compositions in reverse order?

2013-01-24 Thread Florent Hivert
  Hi Jean-Yves,

I'm very happy to see you starting to use sage and giving us constructive
feedback.


On Wed, Jan 23, 2013 at 11:31:37PM -0800, Jean-Yves Thibon wrote:
 
 The problem is that, for the average user, Partitions(n), or 
 Compositions(n), or
 Whatever(n) is expected to behave like, say, xrange(n). Removing __len__ 
 breaks basic
 python functionalities, results in  head scratching (What am I doing 
 wrong?),
 and drives the user to a hack-oriented programming style.

I'm not sure to agree with that. I also think, you are not an average Sage
user, you know way too much of Python. In this case xrange(n) is an
iterator, that is a Python/computer stuff, whereas Partitions(n) models the
sets of all partitions of n. 

 For algebraic purposes, I have never seen partitions of more than 25 or 
 compositions
 of more than 16, let alone permutations of more than 14 . 
 For number theory or enumerative combinatorics, one needs much larger 
 values, 
 but a user trying to generate more than 
 2**62 = 4611686018427387904 objects will probably accept an overflow error. 
 
 So, why not let __len__ try to return int(cardinality) and throw and
 exception if it is too large? 

The main problem i see with that is that in many time cardinality is
implemented by running through the element... A similar problem is that I've
no way to prevent the user to write:

sage: list(Partitions())
...
infinite loop

which is closely related to

sage: len(Partitions())
...
AttributeError: __len__ has been removed; use .cardinality() instead

whereas I'd like to teach him as soon as possible to write

sage: Partitions().list()
[...]
NotImplementedError: infinite list
sage: Partitions().cardinality()
+Infinity

which both are fast to answer an perfectly makes sense. I've the feeling that
keeping the len stuff leads to more confusion for mathematician (not for
Python programmer).

Cheers,

Florent

-- 
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] Re: Compositions in reverse order?

2013-01-23 Thread Florent Hivert
  Dear Jean-Yves,

 OK, but there is some inconsistent behavior, anyway:
 
 
 sage: P=Partitions(4)
 sage: len(P)
 5
 sage: C=Compositions(4)
 sage: len(C)
 ---
 AttributeErrorTraceback (most recent call last)
 
 /home/jyt/monge/TEX/QSCHUR/ipython console in module()
 
 /home/jyt/src/sage-5.4.1/local/lib/python2.7/site-packages/sage/combinat/combinat.py
  
 in __len__(self)
 972 AttributeError: __len__ has been removed; use 
 .cardinality() instead
 973 
 -- 974 raise AttributeError, __len__ has been removed; use 
 .cardinality() instead
 975 
 976 def count(self):
 
 AttributeError: __len__ has been removed; use .cardinality() instead
 sage: R=reversed(P)
 sage: list(R)
 [[1, 1, 1, 1], [2, 1, 1], [2, 2], [3, 1], [4]]

Yes ! As you probably already guessed, everything is not yet in a clean
state... The first call should raise the same error than the second one. We
can't answer consistently to len because Python specified it as being a
machine integer. This is much too small for cardinality of combinatorial set
and prevent for returning infinity. So as the error message tell you, please
write

sage: P=Partitions(4)
sage: P.cardinality()
5

sage: P=Partitions(4000)
sage: P.cardinality()
1024150064776551375119256307915896842122498030313150910234889093895

sage: P=Partitions()
sage: P.cardinality()
+Infinity

And indeed, I think that

sage: len(Compositions(4000))
[...]
AttributeError: __len__ has been removed; use .cardinality() instead

Is a much clean behavior than:

sage: len(Partitions(4000))
[...]
RuntimeError: maximum recursion depth exceeded in cmp

A++

Florent

-- 
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] queue does not apply

2013-01-14 Thread Florent Hivert
On Sun, Jan 13, 2013 at 10:09:32PM -0800, Anne Schilling wrote:
 Hi Florent,
 
 The queue currently does not seem to apply to sage-5.5:
 
 ...
 applying operads-fh.patch
 applying operads_more-fc.patch
 applying pretty_console_print_fix-fh.patch
 unable to find 'sage/misc/pretty_console_print.py' for patching
 2 out of 2 hunks FAILED -- saving rejects to file 
 sage/misc/pretty_console_print.py.rej
 patch failed, unable to continue (try -v)
 patch failed, rejects left in working dir
 errors during apply, please fix and refresh pretty_console_print_fix-fh.patch
 Abort

My mistake... This sould be fixed now.

Cheers,

Florent

-- 
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] Sage-Combinat poster

2013-01-13 Thread Florent Hivert
On Sun, Jan 13, 2013 at 11:18:11AM +0100, Florent Hivert wrote:
   Hi Nicolas,
 
 On Sat, Jan 12, 2013 at 05:36:21PM +0100, Nicolas M. Thiery wrote:
  On Sat, Jan 12, 2013 at 04:44:33PM +0100, Nicolas M. Thiery wrote:
   Comments and suggestions welcome, in particular for the last column
   devoted to examples with pictures. In case we decide to keep and
   update the list of logo, please add the appropriate logos in the
   PICTURES directory.  I probably won't touch the file for the next
   couple hours, so feel free to hack in.
  
  Hem, I just did and started adding some examples with pictures ...
 
 As you asked me yesterday, I attached a tex file with some nice examples...
 I can give you more with k-shapes if you want.

FYI: make work on my laptop.

Cheers,

Florent

-- 
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] Sage-Combinat poster

2013-01-13 Thread Florent Hivert
  Hi Nicolas,

  Thanks Anne, Florent, Paul-Olivier for your contributions to the
  poster. I just pushed a version which I consider final for the time
  being. But feel free to edit further to improve!

I fixed a little bit the output of the last (removed uneeded parentheses) so
that now it fits in the page.

Cheers,

Florent

-- 
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] Re: Don't use combinat with 5.4.rc2 (fixed)

2012-10-31 Thread Florent Hivert
  Hi Hugh,

 9265 was merged in 5.4.beta1; it then got unmerged again.  So the guards 
 should be set so neither of those patches would get applied to 5.4.beta1.  
 If you didn't run sage -combinat update explicitly, but are just using hg 
 to pull patches, then your guards may not be set right; you should either 
 run sage -combinat update or else add 5_4_rc2 to your 
 sage-xxx/devel/sage-combinat/.hg/patches/guards file.

For normal usage, you shoudn't need to edit guards manually. The combinat
script do that for you if you call
sage -combinat qselect
So basically sage -combinat update does more or less the following sequence:

  1 - memorize the top patch returned by hq qtop
  2 - hg qpop -a
  3 - cd $SAGE_DEVEL/.hg/patch
  4 - hg pull
  5 - hg update
  6 - cd $SAGE_DEVEL/
  7 - sage -combinat qselect
  8 - hg qgoto patch memorized at step 1

Cheers,

Florent

-- 
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.



[sage-combinat-devel] Poset relabelling and equality

2012-10-25 Thread Florent Hivert
  Hi,

With Nathann, we just got the following behavior:

sage: p = Poset(((0,1,2),[(0,1),(0,2)]), facade=True)
sage: pp = p.relabel({0:0, 1:2, 2:1})
sage: p == pp
False

so relabeling by an automorphism doesn't return the same poset ! Note however
that:

sage: Poset(((0,1,2),[(0,1),(0,2)])) == Poset(((0,2,1),[(0,2),(0,1)]))
True
sage: Poset(((0,1,2),[(0,1),(0,2)]), facade=True) == 
Poset(((0,2,1),[(0,2),(0,1)]), facade=True)
True

So during construction Sage is able to recognize equal Posets. I'm not
sure how to deal with this and the following remark of the documentation:

.. note::

As can be seen in the above examples, the default linear
extension of ``Q`` is that of ``P`` after relabelling. In
particular, ``P`` and ``Q`` share the same internal Hasse
diagram.

Adding uniqueness and this means that all isomorphic posets must share the
same underlying hasse_diagram. I don't think this is a good idea.

So I'm not sure what to do here.

Cheers,

Florent

-- 
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.



[sage-combinat-devel] SearchForest and post_process...

2012-10-10 Thread Florent Hivert
  Hi There,

Thanks to Nicolas the Little, Sage has a SearchForest class. It is a very nice
tools to iterate through sets defined by a recursive choice
tree. Unfortunately, currently due to the name someone who doesn't know that
it exists has no chance to find it. It seems that there is an agreement that
the mane should be changed but we didn't yet find a good one. Let me describe
a little what it does (please refer to the doc for more informations and
examples):

The enumerated set is mostly described by two data:
  - roots which are the starting nodes of the recursive generation
  - children with compute the immediate successors of a node in the generation
tree.
One can also provide a post_process function that allows for customizing the
nodes that are actually produced. Furthermore, if it returns None, then the
node won't be output at all.

I'd like to gather proposal and find an agreement on the names for
SearchForest and post_process.

Here are some proposal for search forest:
 - TreeGeneratedSet
 - ForestGeneratedSet
 - RecursivelyGeneratedSet
 - ChoiceTree
 - ChoiceForest
...

Nathann Cohen suggested to rename post_process with map_function, underlying
the fact that post_process is mapped on the sets of node of the tree. I'd like
to have a vote on this rename, possibly with alternative proposal.

\begin{pub}
I'm finishing to polish a class named currently
{{{SearchForestMapReduce}}} which allows to apply in a parallel and
distributed way a map-reduce scheme on the node generated by a such a
forest. For example, here's the Sage code for binary words of length less
or equal that 16:

  sage: S = SearchForest(
  ... roots = [[]],
  ... children = lambda l: [l+[0], l+[1]] if len(l)  16 else [])
  sage: S.map_reduce(
  ... map_function = lambda z: x**len(z),
  ... reduce_function = lambda x,y: x+y,
  ... reduce_init = 0 )
  65536*x^16 + 32768*x^15 + 16384*x^14 + 8192*x^13 + 4096*x^12 + 2048*x^11 
+ 1024*x^10 + 512*x^9 + 256*x^8 + 128*x^7 + 64*x^6 + 32*x^5 + 16*x^4 + 8*x^3 + 
4*x^2 + 2*x + 1
\end{pub}

Thanks for your suggestions,

Florent

-- 
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] Re: SearchForest and post_process...

2012-10-10 Thread Florent Hivert
   Hi Simon,

 On 2012-10-10, Florent Hivert florent.hiv...@lri.fr wrote:
  I'd like to gather proposal and find an agreement on the names for
  SearchForest and post_process.
 
 I don't know if my answer to sage-devel will automatically appear here
 as well. If not: I suggested RecursiveSet and branch_cut as new
 names for SearchForest and post_process (though I am not so sure if
 branch_cut is the actual purpose of post_process).

Thanks for your suggestion. Actually branch_but doesn't describe what
post_process does. Cutting branch is done by children. The precise
description of the purpose of post_process is the following:

Through roots and children we are given a recursive tree of nodes n. From this
tree we want to derive a set S. First of all, often we need to apply a certain
function f(n) to compute the actual element of S. So in this sense we are just
applying a map f to the set of the node. On the other hand sometimes, all the
nodes are used to build element of S. Sometime only certain node are kept (eg
leaves), the other node are just intermediate steps of the recursion. In this
case f can return None to indicate that no element of s is associated to the
node n.

For example, suppose that you want to iterate through all permutations of a
given set S. One solution is to take element of S one by one an to insert them
at every position. So a node contains two informations
  - the list lst of already inserted element
  - the set st of the yet to be inserted element
You want to generate a permutation only if st is empty (leaves on the
tree). Also instead of list you may want to generate tuples. Here is the code:

sage: def children((lst, st)):
...   st = set(st) # make a copy
...   if st:
...  el = st.pop()
...  for i in range(0, len(lst)+1):
...  yield (lst[0:i]+[el]+lst[i:], st)
sage: list(children(([1,2], {3,7,9})))
[([9, 1, 2], set([3, 7])), ([1, 9, 2], set([3, 7])), ([1, 2, 9], set([3, 
7]))]
sage: S = SearchForest( [([], {1,3,6,8})],
...   children,
...   post_process = lambda (l, s): tuple(l) if not s else None, 
...   category=FiniteEnumeratedSets())
sage: S.list()
[(6, 3, 1, 8), (3, 6, 1, 8), (3, 1, 6, 8), (3, 1, 8, 6), (6, 1, 3, 8), (1, 
6, 3, 8), (1, 3, 6, 8), (1, 3, 8, 6), (6, 1, 8, 3), (1, 6, 8, 3), (1, 8, 6, 3), 
(1, 8, 3, 6), (6, 3, 8, 1), (3, 6, 8, 1), (3, 8, 6, 1), (3, 8, 1, 6), (6, 8, 3, 
1), (8, 6, 3, 1), (8, 3, 6, 1), (8, 3, 1, 6), (6, 8, 1, 3), (8, 6, 1, 3), (8, 
1, 6, 3), (8, 1, 3, 6)]
sage: S.cardinality()
24

By the way, I'm adding this to the documentation ;-)

Nathann is suggesting to call post_process map_function because we just map
it on the node, dropping the None results.

I hope it is more clear,

Cheers,

Florent

-- 
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] SearchForest and post_process...

2012-10-10 Thread Florent Hivert
 And then
 {{{
 sage: S = SearchForest(roots = [''], children = children)
 sage: list(S.elements_of_depth(4))
 ['abac', 'abca', 'abcb', 'acab', 'acba', 'acbc', 'babc', 'baca',
 'bacb', 'bcab', 'bcac', 'bcba', 'caba', 'cabc', 'cacb', 'cbab',
 'cbac', 'cbca']
 sage: S.elements_of_depth_iterator(100).next()
 'abacabcacbabcabacabcacbacabacbabcabacabcacbabcabacbabcacbacabacbabcabacabcacbabcbacabacbabcabacabcac'
 }}}
 
 But for more complicated languages, to build words of length n+1 we
 need in general more than the words of length n... ie we have to store
 extra computation for each word of length n. As far as I understand,
 removing extra computation may be an example of post_process ?

Exactly !

  Here are some proposal for search forest:
   - TreeGeneratedSet
   - ForestGeneratedSet
   - RecursivelyGeneratedSet
   - ChoiceTree
   - ChoiceForest
  ...
 
 For naming convention, I would like to see Recursive and I don't
 understand why there is a Search in the name ? It is more an
 exhaustion than a search, isn't it ?

See Nicolas answer...

Florent

-- 
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] Re: the queue applies on 5.4.beta2 and 5.4.rc0

2012-10-08 Thread Florent Hivert
  Hi Hugh,

Thanks for your help.

  Florent, your patch trac_8703-trees-fh.patch needs to be rebased over 
  #5160 (which renames the file sage/misc/sagex_ds and makes some minor 
  markup changes, some of which coincide with yours).  I have guarded this 
  patch, and the patches that depend on it, so that they are not applied 
  against 5.4.rc0.  
 
  Frédéric, among the patches relying on Florent's 8703 are some of yours.  

I forgot to mention: those are now rebased and should apply on 5.3 and
5.4.rc1.

Cheers,

Florent

-- 
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.



[sage-combinat-devel] trac_11187-finite_reflection_groups-cs.patch

2012-10-08 Thread Florent Hivert
  Dear Christian,

The chunk

diff --git a/sage/combinat/backtrack.py b/sage/combinat/backtrack.py
--- a/sage/combinat/backtrack.py
+++ b/sage/combinat/backtrack.py
@@ -393,6 +393,8 @@ class SearchForest(Parent):
 self._algorithm = algorithm
 Parent.__init__(self, facade = facade, category = 
EnumeratedSets().or_subcategory(ca
tegory))
 
+__len__ = None
+
 def _repr_(self):
 r
 TESTS::

of your patch

   trac_11187-finite_reflection_groups-cs.patch

is redundant with the very same one I put in

   trac_13580-map_reduce-fh.patch

By chance there is no conflict in the two patch but the line end up twice in
the file. So probably, the second which enters Sage should delete the
chunk. Nathann is pushing me to finish the patch, so mine may enter Sage
soon. Do you think you will beat me, do you want me to remove the chunk in
your patch or do you want to take care of it ?

Cheers,

Florent

-- 
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.



[sage-combinat-devel] Compiling the doc...

2012-10-07 Thread Florent Hivert
  Hi there,

The doc currently doesn't compile (at least on sage-5.3 upto
map_reduce.patch). Here is teh error message: 
  
[...]
  File 
/home/data/Sage-Install/sage-5.3/local/lib/python2.7/site-packages/sage/sets/set_from_iterator.py,
 line 291
SyntaxError: Non-ASCII character '\xc2' in file 
/home/data/Sage-Install/sage-5.3/local/lib/python2.7/site-packages/sage/sets/set_from_iterator.py
 on line 291, but no encoding declared; see 
http://www.python.org/peps/pep-0263.html for details

It seems that the culprit is:

popcorn-*el/sage-combinat $ hg log sage/sets/set_from_iterator.py 
changeset:   17379:19756faaa2ac
tag: trac_12518-enumerated_set_from_iterator-vd.patch
user:Florent Hivert florent.hiv...@univ-rouen.fr
date:Thu Oct 04 09:40:41 2012 +0200
summary: Added a decorator which will automatically return a combinatorial 
class from a f  

Vincent: can you fix it ?

Cheers,

Florent

-- 
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.



[sage-combinat-devel] Re: [sage-devel] Cartan matrix for a relabelled Cartan type?

2012-10-03 Thread Florent Hivert
  Hi,

 When relabelling a Cartan type:
 
 sage: A3 = CartanType(A3)
 sage: A3r = A3.relabel({1:2,2:3,3:1})
 
 one loses the cartan_matrix method, which is not implemented in 
 [...]/combinat/root_system/type_relabel.py.
 
 It would be trivial to create it: just calling the cartan_matrix method of 
 the CartanType parent and reordering columns and rows according to the 
 relabelling.
 
 May I open a ticket in trac?

I'm forwarding this to sage-combinat-devel, where most root system related
discussions take place.

Cheers,

Florent

-- 
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.



[sage-combinat-devel] Reject on Sage 5.2

2012-09-12 Thread Florent Hivert
  Hi there,

   On Sage 5.2:

popcorn-*el/sage-combinat $ sage -combinat qselect
Switching to sage combinat root directory: 
/home/data/Sage-Install/sage-5.2/devel/sage-combinat
Current non version guards: 
Updated non version guards: 
Switching to sage combinat root directory: 
/home/data/Sage-Install/sage-5.2/devel/sage-combinat
Skip backward compatibility patches for sage 4.1.2
Skip backward compatibility patches for sage 4.3.3
[...]
Skip backward compatibility patches for sage 5.1.beta0
Skip backward compatibility patches for sage 5.1.beta1
Skip backward compatibility patches for sage 5.1.beta4
Skip backward compatibility patches for sage 5.1.beta5
Skip backward compatibility patches for sage 5.2.beta0
Skip backward compatibility patches for sage 5.2.beta1
Skip backward compatibility patches for sage 5.2.rc0
Keep backward compatibility patches for sage 5.3.beta0
Keep backward compatibility patches for sage 5.3.beta1
Keep backward compatibility patches for sage 5.3.beta2
Keep backward compatibility patches for sage 5.3.beta2
Keep backward compatibility patches for sage 5.3.rc0
Keep backward compatibility patches for sage 5.4
Keep backward compatibility patches for sage 5.4.beta0
Keep backward compatibility patches for sage 5.4.beta1
Updating guards
  hg --config 'extensions.hgext.mq=' --config 'ui.username=sage-combinat 
script' qselect -q -n
  hg --config 'extensions.hgext.mq=' --config 'ui.username=sage-combinat 
script' qselect 5_3_beta0 5_3_beta1 5_3_beta2 5_3_beta2 5_3_rc0 5_4 5_4_beta0 
5_4_beta1
number of unguarded, unapplied patches has changed from 170 to 199
popcorn-*el/sage-combinat $ hg qpush -a
application de trac_13243-new_methods_for_compositions-fs.patch
application de trac_13233-add_sstposet.patch
application de trac_13224-poset-slender-as.patch
[...]
application de trac_11929_8899-ncsf-qsym-fs-5.2.patch
skipping trac_11929_8899-ncsf-qsym-final.patch - guarded by '-5_3_beta2'
skipping trac_11929_8899-ncsf-qsym-repr-fix-fs.patch - guarded by '-5_3_beta2'
application de trac_13404-sf-nt.3.patch
patching file sage/combinat/ncsf_qsym/ncsf.py
Hunk #1 FAILED at 492
1 out of 1 hunks FAILED -- saving rejects to file 
sage/combinat/ncsf_qsym/ncsf.py.rej
l'application du patch a échoué, impossible de continuer (essayez avec -v)
patch failed, rejects left in working dir
des erreurs se sont produites durant l'application, veuillez corriger puis
rafraîchir trac_13404-sf-nt.3.patch

Florent

-- 
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] mutable trees

2012-09-04 Thread Florent Hivert
  Hi Viviane,

On Mon, Sep 03, 2012 at 11:41:21PM +0200, Viviane Pons wrote:
 I'm working with LabelledRootedTree but my problem is that I need to
 create first all the nodes and then an algorithm creates connection
 parent-child. It is something like that:
 
 for v in g.vertices():
 nodes[v] = LabelledRootedTree([], v;label) # labelled tree node
 with no child
 
 for ... :
 if ...:
nodes[v1].append(nodes[v2]) #adding children
 
 This is not possible because LabelledRootedTree is not mutable. But I
 don't know how to create a mutable labelled rooted tree (and I don't
 really understand how the tree class architecture works). When I'm
 finished building the tree, at the end of my algorithm, I would really
 much like to change the tree back to immutable. This thing seems
 really natural for me but for some reason, it seems really difficult
 to do !

If you want a mutable tree, you should use cloning:

sage: t = LabelledRootedTrees().an_element()
sage: tt = t.clone()
sage: tt.set_label([1,0], 34234)
sage: tt
toto[3[], 42[3[], 34234[]], 5[None[]]]
sage: tt.set_immutable()
sage: tt.set_label([1,0], 34234)
...
ValueError: object is immutable; please change a copy instead.

Currently, it is not possible to create a tree in a mutable state.

Cheers,

Florent

-- 
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 symmetric function scalar product?

2012-08-29 Thread Florent Hivert
Hi Franco,

  Someone sent me the following sage session, which I cannot reproduce,
  but I'm asking whether this is a known issue and whether someone can
  reproduce it:
 
 
  sage: p=SFAPower(QQ)
  sage: s=SFASchur(QQ)
 
  sage: f = p([1,1,1,1,1,1,1,1,1,1,1])/990 + p([2,2,2,2,2,1])/10 +
  p([5,5,1])/10 - p([10,1])/10 + p([9,1,1])/3 + p([3,3,3,1,1])/9 +
  5*p([11])/11
 
  sage: [f.scalar(s(q)) for q in Partitions(11)]
  [1, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 2, 0, 1, 1, 1, 1, 0, 0, -1, 2, 1,
  -1, 2, 4, 3, 0, 1, 0, 2, 1, 0, 1, 1, 2, 1, 127020063634, 1, 1, 0, 0,
  158403414193, 0, 1, -1, 1, 0, 19558976098, 0, 1, 3804836920632,
  29874454, 6021978496, -1, 0, 1]
 
  Expected:
  [1, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 2, 0, 1, 1, 1, 1, 0, 0, -1, 2, 1,
  -1, 2, 4, 3, 0, 1, 0, 2, 1, 0, 1, 1, 2, 1, 2, 1, 1, 0, 0, 3, 0, 1, -1,
  1, 0, 2, 0, 1, 0, 0, 0, -1, 0, 1]

I'm wondering: did this happen during a session, or is the bug triggered
deterministically after the preceding sequences of command ?

Cheers,

Florent

-- 
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] queue

2012-06-22 Thread Florent Hivert
On Wed, Jun 20, 2012 at 11:32:44PM -0700, Anne Schilling wrote:
 Hi!
 
 Currently, the following patch does not apply:
 
 applying update-dot2tex-nt.patch
 applying sage-demos-and-tutorials-nt.patch
 patching file doc/en/reference/combinat/index.rst
 Hunk #1 FAILED at 3
 1 out of 1 hunks FAILED -- saving rejects to file 
 doc/en/reference/combinat/index.rst.rej
 patching file sage/combinat/__init__.py
 Hunk #2 FAILED at 87
 1 out of 2 hunks FAILED -- saving rejects to file 
 sage/combinat/__init__.py.rej
 patch failed, unable to continue (try -v)
 patch failed, rejects left in working dir
 errors during apply, please fix and refresh sage-demos-and-tutorials-nt.patch

I just guarded the patches...

Florent

-- 
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.



[sage-combinat-devel] A pretty bug...

2012-06-20 Thread Florent Hivert
sage: A = WQSymOperad(QQ)
sage: A[{1,2}, {3}]
A[12,3]
sage: A.an_element()
A[_,a,n,_,e,l,e,m,e,n,t,_]

Enjoy,

Florent

-- 
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] import statement strange behaviour

2012-05-21 Thread Florent Hivert
  Hi,

On Mon, May 21, 2012 at 10:12:16PM +0200, Vincent Delecroix wrote:
  When there are several names, I think we should return the one that
  agrees with the name that was given by the user.
 
 I really don't know how we can obtain the name used inside the
 function. We should somewhat access the stack of calls of the console
 (as the calls import_statement(CachedFunction) and
 import_statements(cached_function) are semantically the same). What
 you would expect from the following non-examples

I don't have time to investigate nor to read the full discussion... So I'm
just trowing some random idea hoping this helps. Did someone had a look at

file:///home/florent/doc/Python-Docs/python-docs-html/library/inspect.html

in partcular function - func_code - co_name

Florent

-- 
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] on DyckWords

2012-05-17 Thread Florent Hivert
  Hi Christian,

 I am currently working on filling the wiki at www.findstat.org with
 more data, since Chris Berg and I are going to present it at the FPSAC
 this summer.
 
 I would like to make the following changes to Dyck words:
 
 1. changing a-statistic, b-statistic, d-statistic to area, bounce,
 dinv (and leaving the old with a warning).

What so you mean by changing them ? Do you mean changing the name ? If so I'm
ok with area but I'd rather have number_of_bounce and spelling explicitely
inversion in dinv... You also should have a look to the tread [1] where we
already discussed some naming convention about statistics on Dyck words.


 2. changing the to_partition to return the partition when cutting out
 the path above the diagonal (currently, the transposed is returned).

Do you have a reason for that ? I wrote this one because we needed it for
k-shape and the convention I took seemed at that time more natural to me. I
don't mind changing the convention and patching my code if there is a good
reason for that.

Florent


[1] 
http://www.mail-archive.com/sage-combinat-devel@googlegroups.com/msg02599.html

-- 
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] Sage 5.0 is ready; bye bye 4.8

2012-05-15 Thread Florent Hivert
  Hi There,

 Sage 5.0 is ready for release [1]! It has a lot of good stuff in it,
 including 41 patches from the Sage-Combinat queue; congrats to all
 those who worked hard to make that happen!

I just backported trac_11585_deprecated_function_alias-rc2.patch which raises
the number of included patch to 42 ! This is a lot more suitable number for
this list ;-)

Cheers,

Florent

-- 
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.



[sage-combinat-devel] Re: Hey

2012-05-10 Thread Florent Hivert
Salut,

 Petit rapport d'utilisation sur les Posets :-D

Merci pour les infos. C'est plutôt sur sage-combinat devel qu'il faut poster
ce genre de truc... Je fais suivre.

 J'espère que ca roxxe au Canada 

Coincé au lit par la grippe :-(

Florent

-- 
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.



[sage-combinat-devel] sage-5.0.beta14 is out...

2012-04-30 Thread Florent Hivert
  Hi there,

I just compiled sage-5.0.beta14 and added some guard on the queue for the new
merged patch. I now got sage combinat working on 5.0.beta14, 5.0.beta13
However, there are various problem with the different version of sage.
I'm not sure I we should try to be compatible with every single version.
What do you think ?

Florent Hivert

= 5.0.beta7/5.0.beta8

application de trac_12876_category-fix_abstract_class-nt.patch
patching file sage/schemes/generic/morphism.py
Hunk #1 FAILED at 119
Hunk #2 FAILED at 133
Hunk #3 FAILED at 157
Hunk #4 FAILED at 199
4 out of 4 hunks FAILED -- saving rejects to file 
sage/schemes/generic/morphism.py.rej
patching file sage/structure/parent.pyx
Hunk #1 succeeded at 1496 with fuzz 1 (offset 7 lines).
l'application du patch a échoué, impossible de continuer (essayez avec -v)
patch failed, rejects left in working dir
des erreurs se sont produites durant l'application, veuillez corriger puis 
rafraîchir trac_12876_category-fix_abstract_class-nt.patch

= 5.0.beta2

application de trac_12653-graph_from_dictionary_of_iterables-nt.patch
patching file sage/graphs/digraph.py
Hunk #2 FAILED at 294
Hunk #4 succeeded at 601 with fuzz 1 (offset -10 lines).
1 out of 4 hunks FAILED -- saving rejects to file sage/graphs/digraph.py.rej
l'application du patch a échoué, impossible de continuer (essayez avec -v)
patch failed, rejects left in working dir
des erreurs se sont produites durant l'application, veuillez corriger puis 
rafraîchir trac_12653-graph_from_dictionary_of_iterables-nt.patch


= 4.8

The queue applies on 4.8 sage doesn't start seemingly du to an import cycle in
the categories (see below the error message).

/home/data/Sage-Install/sage-4.8/local/lib/python2.6/site-packages/sage/categories/adjective_category.pyc
 in base_category_class_and_adjectives(cls)
146 base_category_class = getattr(sage.categories.basic, name)
147 else:
-- 148 import sage.categories.all
149 if not name in sage.categories.all.__dict__:
150 raise RuntimeError, Could not guess adjectives for the 
class %s%cls

/home/data/Sage-Install/sage-4.8/local/lib/python2.6/site-packages/sage/categories/all.py
 in module()
113 # finite dimensional * with basis
114 from finite_dimensional_modules_with_basis   import 
FiniteDimensionalModulesWithBasis
-- 115 from finite_dimensional_algebras_with_basis  import 
FiniteDimensionalAlgebrasWithBasis
116 from finite_dimensional_coalgebras_with_basisimport 
FiniteDimensionalCoalgebrasWithBasis
117 from finite_dimensional_bialgebras_with_basisimport 
FiniteDimensionalBialgebrasWithBasis

/home/data/Sage-Install/sage-4.8/local/lib/python2.6/site-packages/sage/categories/finite_dimensional_algebras_with_basis.py
 in module()
 14 from sage.categories.category import Category
 15 from sage.categories.adjective_category import 
AdjectiveCategory_over_base_ring
--- 16 from sage.categories.non_unital_algebras import NonUnitalAlgebras
 17 from sage.categories.algebras import Algebras
 18 from sage.categories.semisimple_algebras import SemisimpleAlgebras

ImportError: No module named non_unital_algebras
Error importing ipy_profile_sage - perhaps you should run %upgrade?
WARNING: Loading of ipy_profile_sage failed.

-- 
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] Plotting permutations

2012-04-24 Thread Florent Hivert
  Hi Nathann,

 I am writing a patch for the recognition of Permutation graphs (and
 comparability graphs, actually), and I thought that it would be nice
 to have some way to plot the permutations built this way. Given a
 permutation p on 1...n, you get the permutation graph by linking
 together two vertices ij such that ij and p(i)  p(j). Hence the kind
 of plot I have in mind is the one you can see on the top-right corner
 of his page :
 
 http://en.wikipedia.org/wiki/Permutation_graph
 
 I intended to write it, but there are two questions that need an
 answer before doing that

 1) Is it aready implemented in Sage somewhere ? I did not see it, but well :-)

The set {(i,j) | ij and p(i)  p(j)} is called the set of the inversion of p
and is in Sage. Rather than the Graph, we use the matrix associated to it
under the name Rothe diagram or inversion diagram. We had it in MuPAD-Combinat
but it wasn't ported to Sage. See eg 

   http://www.mathe2.uni-bayreuth.de/frib/KERBER/h00/node29.html

It is closely related to the Lehmer code of the permutation which is in sage.

 2) Is it useful to add it as a method of Permutation ? That is, should
 it be implemented there or rather as a part of my recognition
 algorithm, if it is only of interest for graph theoreticians ?

The algorithm I used to teach my Master students works as follows: Build an
orientation of the complete graph K_n as follows: for ij the arrow is
oriented
   * j - i if (i,j) is an inversion (ie is in your Graph)
   * i - j else
Then the inversion set (or the candidate permutation graph) comes from a
permutation if the resulting orientation of K_n is acyclic. Is it what you
want to implement (or maybe an optimization of it) ?

Now, to answer your question, I certainly would vote +1 on having a
Permutation.from_inversions methods which raise an error if the parameter is
not a proper inversion set. Alternatively, is_inversion_set returning True
or False is good too.

Cheers,

Florent




 Thanks ! :-)
 
 Nathann
 
 -- 
 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.

-- 
Florent Hivert
  ---
   Il y a trois sortes de gens dans le monde : ceux qui savent compter et
ceux qui ne savent pas.
   There are three kinds of people in the world: those who can count,
and those who cannot.
  ---
Professeur, LRI, Univ. Paris Sud 11, CNRS.
Bureau 38, Laboratoire de Recherche en Informatique (UMR CNRS 8623)
Bâtiment 650, Université Paris Sud 11, 91405 ORSAY CEDEX
Tél: 01-69-15-65-99
http://www.lri.fr/~hivert

-- 
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] breakage of k-Schur function code

2012-04-23 Thread Florent Hivert
On Mon, Apr 23, 2012 at 11:10:22AM -0700, Frédéric Chapoton wrote:
 Hello,
 
 I have the same problem, with 5.0 beta8 :
 
 /home/chapoton/sage-5.0.beta8/spkg/bin/sage: line 308:  2466 Erreur de 
 segmentation  sage-ipython $@ -i

Me too ! I'm investigating.

Florent

-- 
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] breakage of k-Schur function code

2012-04-23 Thread Florent Hivert
On Mon, Apr 23, 2012 at 11:10:22AM -0700, Frédéric Chapoton wrote:
 Hello,
 
 I have the same problem, with 5.0 beta8 :
 
 /home/chapoton/sage-5.0.beta8/spkg/bin/sage: line 308:  2466 Erreur de 
 segmentation  sage-ipython $@ -i

I just pushed a temporary fix. Before updating you need to remove the two
following files:

devel/sage-combinat/build/lib.linux-x86_64-2.7/sage/misc/classcall_metaclass.so
devel/sage-combinat/build/sage/misc/classcall_metaclass.so

Hopefolly it should work.

Florent

-- 
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] breakage of k-Schur function code

2012-04-23 Thread Florent Hivert
On Mon, Apr 23, 2012 at 08:44:35PM +0200, Florent Hivert wrote:
 On Mon, Apr 23, 2012 at 11:10:22AM -0700, Frédéric Chapoton wrote:
  Hello,
  
  I have the same problem, with 5.0 beta8 :
  
  /home/chapoton/sage-5.0.beta8/spkg/bin/sage: line 308:  2466 Erreur de 
  segmentation  sage-ipython $@ -i
 
 I just pushed a temporary fix. Before updating you need to remove the two
 following files:
 
 devel/sage-combinat/build/lib.linux-x86_64-2.7/sage/misc/classcall_metaclass.so
 devel/sage-combinat/build/sage/misc/classcall_metaclass.so

This was partially my mistake, I imported a broken patch from trac. This
should be fully fixed now. Just update and it should work. Sorry for the
problem.

Florent

-- 
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.



[sage-combinat-devel] Loop import

2012-04-18 Thread Florent Hivert
Hi there,

Currently with sage-4.8, there is an import loop (see below). I just pushed
the following **TEMPORARY PATCH** which should fix it. By the way there are a
*lot* of stuff that are imported by default in combinat and that we should
lazy_import. Please fix correctly.

Florent



popcorn-*at/sage/combinat $ hg qpus
application de TEMPORARY_IMPORT_LOOP_FIX.patch
actuellement à : TEMPORARY_IMPORT_LOOP_FIX.patch
popcorn-*at/sage/combinat $ hg qdiff
diff --git a/sage/combinat/subword_complex.py b/sage/combinat/subword_complex.py
--- a/sage/combinat/subword_complex.py
+++ b/sage/combinat/subword_complex.py
@@ -21,7 +21,8 @@ from sage.misc.cachefunc import cached_m
 from sage.modules.free_module_element import vector
 from sage.homology.simplicial_complex import SimplicialComplex, Simplex
 from sage.combinat.combination import Combinations
-from sage.geometry.polyhedron.constructor import Polyhedron
+from sage.misc.lazy_import import lazy_import
+lazy_import('sage.geometry.polyhedron.constructor', ['Polyhedron'])
 from sage.geometry.cone import Cone
 from sage.structure.element import Element
 from sage.structure.parent import Parent



--
| Sage Version 4.8, Release Date: 2012-01-20 |
| Type notebook() for the GUI, and license() for information.|
--
---
ImportError   Traceback (most recent call last)

/home/data/Sage-Install/sage-4.8/local/lib/python2.6/site-packages/IPython/ipmaker.pyc
 in force_import(modname, force_reload)
 61 reload(sys.modules[modname])
 62 else:
--- 63 __import__(modname)
 64 
 65 

/home/data/Sage-Install/sage-4.8/local/bin/ipy_profile_sage.py in module()
  5 preparser(True)
  6 
 7 import sage.all_cmdline
  8 sage.all_cmdline._init_cmdline(globals())
  9 

/home/data/Sage-Install/sage-4.8/local/lib/python2.6/site-packages/sage/all_cmdline.py
 in module()
 12 try:
 13 
--- 14 from sage.all import *
 15 from sage.calculus.predefined import x
 16 preparser(on=True)

/home/data/Sage-Install/sage-4.8/local/lib/python2.6/site-packages/sage/all.py 
in module()
108 
109 from sage.coding.all import *
-- 110 from sage.combinat.all   import *
111 
112 from sage.lfunctions.all import *

/home/data/Sage-Install/sage-4.8/local/lib/python2.6/site-packages/sage/combinat/all.py
 in module()
112 
113 # Cluster Algebras and Quivers
-- 114 from cluster_algebra_quiver.all import *
115 
116 #import lrcalc

/home/data/Sage-Install/sage-4.8/local/lib/python2.6/site-packages/sage/combinat/cluster_algebra_quiver/all.py
 in module()
  2 from quiver import Quiver, PathAlgebra, QuiverMorphism, GAPQuiver
  3 from cluster_seed import ClusterSeed
 4 from cluster_complex import ClusterComplex
  5 
  6 

/home/data/Sage-Install/sage-4.8/local/lib/python2.6/site-packages/sage/combinat/cluster_algebra_quiver/cluster_complex.py
 in module()
 19 from sage.combinat.root_system.coxeter_group import CoxeterGroup
 20 from sage.combinat.cluster_algebra_quiver.cluster_seed import 
ClusterSeed
--- 21 from sage.combinat.subword_complex import SubwordComplex, 
SubwordComplexFacet
 22 from sage.rings.semirings.non_negative_integer_semiring import NN
 23 

/home/data/Sage-Install/sage-4.8/local/lib/python2.6/site-packages/sage/combinat/subword_complex.py
 in module()
 22 from sage.homology.simplicial_complex import SimplicialComplex, Simplex
 23 from sage.combinat.combination import Combinations
--- 24 from sage.geometry.polyhedron.constructor import Polyhedron
 25 from sage.geometry.cone import Cone
 26 from sage.structure.element import Element

ImportError: No module named polyhedron.constructor
Error importing ipy_profile_sage - perhaps you should run %upgrade?
WARNING: Loading of ipy_profile_sage failed.

sage: 




-- 
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.



[sage-combinat-devel] Adding NN as a standard constant

2012-03-21 Thread Florent Hivert
  Hi there,

I can't find exactly where but recently someone (Anne ? Travis ?) what trying
to use the \NN macro. I just finished my patch which add this and solve a few
problems with HTML/LaTeX output documentation. This is #12717 needing review,
except I can't manage to upload the patch right now probably due to some trac
problem. The patch is anyway on the queue.

Cheers,

Florent

-- 
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.



[sage-combinat-devel] Re: Fwd: Re:

2012-03-20 Thread Florent Hivert
  Hi Travis,

Well this somewhat happened spontaneously here. I have no problems with
 moving this to the group (via a copy/paste).

??? What is this about ???

My comment about the interpreter had to do was based more on Python
 rather than Sage. Since in Python, the parser (i.e. compiler) converted the
 script file into executable tokens which the interpreter pushed to the
 computer to generate output; whereas in Sage, we compile the scripts that
 are then fed to the interpreter, so we can do pre-processor operators (such
 as in-lining functions).

I don't understand. Sage source code are plain Python code. The preprocessor
only deals with interactive output or users .sage scripts. And no such script
are allowed (currently) in Sage source. Moreover the preprocessor is kept
minimal by design choice. As far as I know nothing that you describe here is
happening.

My original thought was the added decorators where converted to
 interpreter-level commands rather than Python-level function calls (I
 thought Sage runs on a modified python interpreter), but they are Cython
 function calls? Also where's the best place I should look to see decorator
 implementations?

http://www.artima.com/weblogs/viewpost.jsp?thread=240808

in Sage:

sage/misc/decorator.py

Actually one other thought, do you check to make sure all referenced
 members are also immutable? For example, suppose Foo is an immutable class
 and Foo.Bar is another object. Does this check to make sure you can't do
 Foo.Bar.mutateBar()? (For example, think const in C++.) I hope that makes
 sense.

I don't check anything. I require that the client performs the proper
checking. So if mutable things can possibly be inserted, that's the role of
the client code (Inheriting from ClonableElement or ClonableList, since this
doesn't make sense to have a mutable int), to check that element are
immutable.

Cheers,

Florent

-- 
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] Re: sage.combinat.sf.sf into the reference manual?

2012-03-10 Thread Florent Hivert
On Fri, Mar 09, 2012 at 04:47:50PM +0100, Nicolas M. Thiery wrote:
 On Fri, Mar 09, 2012 at 06:51:15AM -0800, Simon King wrote:
  Still: Is there a list of available markups?
 
 Florent?

Standard ReST markup:

http://docutils.sourceforge.net/docs/ref/rst/directives.html

Sphinx specific markup:

http://sphinx.pocoo.org/markup/index.html

Florent

-- 
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] comments/questions on poset code

2012-02-25 Thread Florent Hivert
  Hi Anne,

On Fri, Feb 24, 2012 at 07:35:56PM -0800, Anne Schilling wrote:
 Thanks! At the end of day, I had to modify the method _element_constructor_ 
 and now
 everything seems to work.
 
 By the way, how do I know which methods have to be implemented? I looked at
 
 sage: from sage.structure.list_clone_demo import IncreasingIntArray
 sage: IncreasingIntArray??
 sage: from sage.structure.list_clone import ClonableIntArray, ClonableList
 sage: ClonableIntArray??
 sage: ClonableList??
 
 and the documentation is not always very clear about this.

I think the base class ClonableElement, makes it very clear:

   A class C inheriting from ClonableElement must implement the
   following two methods

   * obj.__copy__() -- returns a fresh copy of obj

   * obj.check() -- returns nothing, raise an exception if obj
 doesn't satisfies the data structure invariants

   and ensure to call obj._require_mutable() at the beginning of any
   modifying method.

Any documentation improvements are mostly welcome.

Cheers,

Florent

-- 
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] comments/questions on poset code

2012-02-22 Thread Florent Hivert
On Wed, Feb 22, 2012 at 11:45:41AM -0800, Anne Schilling wrote:
 Hi Florent,
 
 Thanks for your help to get ClonableIntArray running for linear extensions
 (through private e-mails).
 
 Now I have more problems with k_tableaux.py In this case there is an optional 
 input mu=None.
 How should _element_constructor_ look like in this case? Could you have a 
 look at
 trac_12250-ktableaux-as.patch
 to see what is wrong with the ClonableIntArray setup in this patch?

I'm sorry but between FPSAC and my teaching I've no more time on Sage right
now. Are you trying to use ClonableIntArray for storing a tableau ? As the
name suggest, ClonableIntArray is only able to store lists of integers. If you
want something more complicated you should use ClonableList.

Cheers,

Florent

-- 
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] comments/questions on poset code

2012-02-19 Thread Florent Hivert
  Hi Anne,

 Thanks! I do not understand how to use it though. If I inherit
 
 from sage.structure.list_clone import ClonableIntArray, ClonableElement
 
 and replace
 
 class LinearExtensionOfPoset(CombinatorialObject, Element):
 
 by
 
 class LinearExtensionOfPoset(ClonableIntArray, ClonableElement):
 
 and put
 
 ClonableIntArray.__init__(self, linear_extension)
 ClonableElement.__init__(self, parent)

Since ClonableIntArray inherits from ClonableElement you shouldn't write
both. Just write

class LinearExtensionOfPoset(ClonableIntArray):

Also, you don't need to write an init if your constructor is just taking the
parent and the list of the value.

If you need some other parameters then write your init as

def __init__(self, parent, linear_extension, other_params):
...
ClonableIntArray.__init__(self, parent, linear_extension)
...


 in my _init__ file, then I get a lot of error messages (whereas all tests 
 pass before the
 change).
 
 Do I need to replace
 
  Element = LinearExtensionOfPoset
 
 as well by
 
   ClonableElement = LinearExtensionOfPoset?

no !

 Element = LinearExtensionOfPoset

is correct.

Florent

-- 
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] comments/questions on poset code

2012-02-18 Thread Florent Hivert
On Sat, Feb 18, 2012 at 06:40:17PM +0100, Nicolas Borie wrote:
 Le samedi 18 février 2012 à 09:29 -0800, Anne Schilling a écrit :
  Which patch is ClonableIntArray in? For me it is not defined (and I am 
  hesitant to base my
  code on something not yet in sage):
  
  sage: class toto(ClonableIntArray):
  : def check(self): pass
  :
  ---
  NameError Traceback (most recent call last)
  
  /Applications/sage-5.0.beta3/devel/sage-combinat/sage/combinat/posets/ipython
   console in module()
  
  NameError: name 'ClonableIntArray' is not defined
 
 Hello,
 
 I think it is already in Sage. You just have to import it.

Exact: Ticket #8702 Datastructure for objects with prototype (clone) design
pattern merged in sage-4.6.2.alpha0. You already used it a lot through #9109
Fast cython class for maps between finite sets which is the structure we use
for transformation monoids (BiHecke, Hn(0), NDPF...)

Cheers,

Florent

-- 
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] comments/questions on poset code

2012-02-17 Thread Florent Hivert
  By the way: changing P.linear_extensions() to return an enumerated set
  rather than a plain list could make sense, assuming there is no speed
  loss. This might require a bit of cythonification; maybe using
  ClonableArray will be enough. It's slightly backward incompatible (it
  does not print the same).
 
 Why did you make the choice to print differently in ClonableArray as opposed 
 to CombinatorialObject?

What is the difference ?

sage: CombinatorialObject([1,2,3])
[1, 2, 3]

sage: class toto(ClonableIntArray):
: def check(self): pass
sage: toto(Parent(), [1,2,3])
[1, 2, 3]

Cheers,

Florent

-- 
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] queue pb on sage-5.0

2012-02-16 Thread Florent Hivert
On Thu, Feb 16, 2012 at 10:01:48AM +, Vincent Delecroix wrote:
 Hi,
 
 Trying to apply the combinat queue on sage-5.0.beta2 I get
 
 applying trac_10963-more_functorial_constructions-nt.patch
 patching file sage/categories/commutative_additive_monoids.py
 Hunk #1 FAILED at 2
 1 out of 2 hunks FAILED -- saving rejects to file
 sage/categories/commutative_additive_monoids.py.rej
 patch failed, unable to continue (try -v)
 patch failed, rejects left in working dir
 errors during apply, please fix and refresh
 trac_10963-more_functorial_constructions-nt.patch

Should be fixed.

Florent

-- 
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.



[sage-combinat-devel] Gathering use cases

2012-02-16 Thread Florent Hivert
  Hi,

With some sage/sage-combinat developers, we get hurt several time by the
problem of equality vs. coercion. Before discussing the problem I'd like to
gather use cases. I created a page on the wiki:

http://wiki.sagemath.org/EqualityCoercion

Please add more example when you hit one.

Cheers,

Florent

-- 
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] queue is broken?

2012-02-12 Thread Florent Hivert
  Hi Anne,

On Sat, Feb 11, 2012 at 11:14:39PM -0800, Anne Schilling wrote:
 On 2/11/12 1:29 AM, Nicolas M. Thiery wrote:
  On Fri, Feb 10, 2012 at 04:37:26PM -0800, Anne Schilling wrote:
  Now there is a new problem:
  applying trac_12484-free_module-monomials_cmp-nt.patch
  
  Gee, this is never ending ... So many changes between 4.8 and 5.0!
  We really need a buildbot for the sage-combinat queue.
  
  Thanks for disbalding (sic:-)) my patch! I now only guarded it out for 4.8.
 
 Disbale ;-) It seemed to worik though despite the misspelling!
 
 Anyway, since I had so much trouble with sage-4.8 and the sage-combinat 
 queue, I installed
 sage-5.0.beta4, but the sage-combinat queue also does not seem compatible 
 with that

First of all, sorry for the constant problems with rejects in the
queue. However, Nicolas And myself spend nearly an entire day rebasing the
queue for sage-5.0.beta2. We *never* advised anyone to go forward.

For me, right now, everything is fine for sage-4.7.2, sage-4.8 and
sage-5.0.beta2. Please report if it's not the case for you. As far as I known,
no one in the sage combinat team has guarded the patches against
sage-5.0.beta3 (I don't think anyone from sage-combinat except you even
compiled it, I'm doing it right now).

Finally sage-5.0.beta4 is not even officially out, see

http://groups.google.com/group/sage-release

So you can't expect anyone support it.

Cheers,

Florent

-- 
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] lazy enumerated set

2012-02-11 Thread Florent Hivert
  Hi,

 Together with the language-team, we decided to implement a
 LazyEnumeratedSet (see my patch in the queue) which takes as input an
 iterable (finite or infinite) and mimic a set which contains the
 element of the iterable. It is very useful when we do not want to
 implement a specific class... What do you think of it ?
 
 On the other hand, I'm a bit disappointed as it is not possible to
 pickle an iterator and hence my new class does not pass the TestSuite.
 Any idea ?

I think this is a good idea to have this feature for the casual user but that
it should not be used in the code. The reason are:
 1 - The set will not be picklable;
 2 - The usage of tee is likely to leak a lot of memory;
 3 - For programmer, I don't think it is a big save compared to subclass and
 implementing the Cardinality and __iter__ methods.  Please have a look it
 some methods couldn't be lifted in the category EnumeratedSet.
If you agree, as a consequence, you should add a big warning at the beginning
of the file.

Finally, may I suggest the alternative name EnumeratedSetFromIterator ?

Cheers,

Florent

-- 
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] First assignment for Sage-Combinat days...

2012-02-04 Thread Florent Hivert
On Sat, Feb 04, 2012 at 12:06:04AM +0100, Nicolas M. Thiery wrote:
 On Fri, Feb 03, 2012 at 11:45:14PM +0100, Nicolas M. Thiery wrote:
  posets is a trivial rebase. I'll try to do it tonight if Sage compiles
  in time.
 
 Voilà, c'est fait, mais en aveugle: j'ai récupéré le patch rebasé
 d'une 5.0 beta1 que j'avais dans un coin. Mais je n'ai pas encore pu
 tester avec la 5.0 beta2 qui compile. Tu peux vérifier que c'est bon?

It seems to be ok: next problem is a short but non-trivial conflict:

application de trac_8327_universal_cyclotomic_field-cs.patch
patching file sage/modules/free_module.py
Hunk #2 FAILED at 564
1 out of 2 hunks FAILED -- saving rejects to file 
sage/modules/free_module.py.rej


--- free_module.py
+++ free_module.py
@@ -564,7 +565,7 @@ class FreeModule_generic(module.Module_o
 Category of modules with basis over Integer Ring
 
 
-if not isinstance(base_ring, commutative_ring.CommutativeRing):
+if base_ring not in CommutativeRings():
 raise TypeError, base_ring (=%s) must be a commutative 
ring%base_ring
 rank = sage.rings.integer.Integer(rank)
 if rank  0:

It seems to conflict with Simon huge work on Categories. I'm waiting Christian
green light to investigate further.

Christian: are we allowed to rebase those patches ?

Cheers,

Florent

-- 
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] Re: Alphabet and FiniteEnumeratedSets

2012-02-04 Thread Florent Hivert
  Hi Vincent,

 One item on the todo list is the migration from CombinatorialClass to
 FiniteEnumeratedSet and InfiniteEnumeratedSet.

This is *the* big think I want to do, together with using ClonableIntArray for
partition permutation and the like.

Cheers,

Florent


What happens to the
 following functions
  * rank(self, elt)
  * unrank(self, i)
  * __getitem__ = unrank
 They are not implemented for IntegerRange as I would expect.

-- 
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.



[sage-combinat-devel] First assignment for Sage-Combinat days...

2012-02-03 Thread Florent Hivert
  Hi there,

I compiled the new sage 5_0beta2 and tried to get the queue applied. For this
I had to guard an awfully large number of patches (see list below). Thing are
maybe not so bad because there is a lot of common dependencies on posets and
categories. However I really fear that the first day in Cernay will be
entirely spent on rebasing.

Christian: it could perhaps help if we are allowed to refresh your various
patches in the following list. I didn't spend time on a serious look to see if
there is a big rebase there, so maybe this won't help. Anyway, Can you please
tell us if you have some uncommitted changes.

Cheers,

Florent

trac_10998-categories-posets-nt.patch   #-4_7_1 #+5_0   # needs 
rebase
trac_10670_integral_mobius_matrix_for_posets-fh.patch   #+5_0   # depend on 
needs rebase 10998
trac_11382-subposet_to_vertex_speedup-fh.patch  #+5_0   # depend on 
needs rebase 10998
trac_8327_universal_cyclotomic_field-cs.patch  #+5_0   # needs 
rebase
trac_8327_universal_cyclotomic_field_new_cython-sk.patch   #+5_0   # needs 
rebase
trac_10963-more_functorial_constructions-nt.patch  #+5_0   # needs 
rebase # depends on #11224, #8327
categories-root_system-6588.patch   #-4_6_1#+5_0   # does not 
apply on 4_6 # trivial dependency on #10963
trac_8678-module_morphisms-nt.patch   #+5_0   # needs rebase
combinatorial-free-module-semiring.patch  #+5_0   # needs rebase
trac_11187-finite_reflection_groups-cs.patch  #+5_0   # needs rebase
trac_1-finite_dimensional_modules-nt.patch#+5_0   # needs rebase
trac_11688_graded_modules_functions-fc.patch  #+5_0   # needs rebase
finite_semigroup-nt.patch #+5_0   # needs rebase
trac_11109-stable-grothendieck-polynomials-nt.patch  #+5_0   # needs rebase
coxeter3-mh_rebase-cs.patch #+5_0   # needs rebase
parking_functions_posets-fh.patch   #+5_0   # needs rebase
finite_j-trivial-radical-fh.patch   #+5_0   # needs rebase
trac_8696-character_rings-nt.patch  #+5_0   # needs rebase
discrete-representations-nt.patch   #+5_0   # needs rebase
bigmess-nt.patch#+5_0   # needs rebase
cachefunc.patch #+5_0   # needs rebase
sage-demos-and-tutorials-nt.patch #-4_7   #+5_0   # needs rebase # requires 
= 4.7

-- 
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] segfault in 4.8

2012-02-01 Thread Florent Hivert
On Wed, Feb 01, 2012 at 08:14:49PM +0100, Christian Stump wrote:
 Hi Florent,
 
  I don't know if its related, but I got segfault with automorphism group of a
  graph if the import wasn't in the correct order. It may be completely wrong
  but I got the impression that Cython isn't catching some mistake like import
  loops leading to segfault. I'm sorry, I've to run right now so that I don't
  have time to give you a precise reference on the relevant thread.
 
 that might be the case, as I do compute the automorphism group
 somewhere in the code (though I am not quite sure if actually in the
 constructor for quivers). Do you see a way of solving the problem?

The way I solved it was to import the group inside the function

see the file sage/categories/symmetric_set_operads.py
whithin the patch operads-fh.patch

def orbit(self):

Return the orbit of ``self`` under the group action

EXAMPLES::

# importing this earlier leads to segfault !!
from sage.groups.perm_gps.permgroup_named import SymmetricGroup
[...]

However, Nicolas told me that he investigated this morning and found the
problem which is elsewhere. I'm surprised that we don't yet get his e-mail.

Nicolas: do you have some outgoing e-mail problem ?

Cheers,

Florent

-- 
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.



[sage-combinat-devel] Rebase for 4_8

2012-01-22 Thread Florent Hivert
  Hi there,

This time the rebase for sage-4.8 was easy so I spent a few minute doing it.
sage should now work both on sage 4.7.2 and 4.8. However there is a few
patches which need some attention:

1 - The following patch doesn't apply anymore because of a conflict with
ticket #9786:

   trac_10534-generation_of_subsets_and_set_partitions-vd.patch

I imported trac_9786_submultiset_fix.patch in the queue and guarded 10534.
Also two more patches depend on it, and should be unguarded as soon as the
former is fixed.

   trac_10534-generation_of_subsets_and_set_partitions-fix-fh.patch
   set_part_std_form-fh.patch

Vincent can you take care of it ?


2 - There seems to be a trivial conflict on

sage-demos-and-tutorials-nt.patch

I guarded that one too. Nicolas Do you have time for it ?

Speaking of patches, the queue is way too long. I think one of the first
objective of the Cernay Days should be to review and finish the long awaiting
patches before everything gets out of control.

Cheers,

Florent

-- 
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] Rebase for 4_8

2012-01-22 Thread Florent Hivert
  Hi Anne,

 Well, for me the sage-combinat queue does not work any longer with 
 sage-4.7.2.:

 [...]
   /Applications/sage/sage -hg --config 'extensions.hgext.mq=' --config 
 'ui.username=sage-combinat script' qpush sage-4.7.2.patch
 applying sage-4.7.2.patch
 [...]

Sage shouldn't apply sage-4.7.2.patch on a 4.7.2. For some reason the guard
vanished or was never added. This should be fixed now.

Sorry !

Florent

-- 
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] min-part, max-part

2012-01-19 Thread Florent Hivert
  Hi,

  I think we should record such things for the week at Cernay during which
  we intend to speak about basic object in combinatorics.

+1 to start to make plan for Cernay.

  Feel free to create a wiki page about weirdness in basics objects of
  combinatorics. I will also try to add some comments about integer
  vectors. I think you are clearly right about the fact that inner/outer
  can be elements of the parent as the feature is related to a (partial)
  order relation between elements.

You definitely should see

http://wiki.sagemath.org/combinat/Weirdness

There is a *lot* of weirdness to fix.

 Good idea. But somebody decided to make a wiki page for Cernay in rst
 format... I do not know how to make a link to another wiki page ? help
 !

Here it is:

`Installation http://wiki.sagemath.org/combinat/Installation`_

Cheers,

Florent

-- 
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] kshape-om

2012-01-09 Thread Florent Hivert
  Hi Anne, hi Olivier,

First of all I wish both of you a fruitful and happy new year.

 Since I recently added a new patch to the sage-combinat queue
 
 trac_12250-ktableaux-as.patch
 
 your kshape-om.patch does not apply any longer since it also introduces a
 file k_tableau.py in /combinat. Perhaps you could rename that file in
 your patch?

Concerning the file k_tableau.py in our patch, it contains only the following
function: 

+def KYoungLattice(n, k):
+from sage.combinat.all import Poset
+from sage.graphs.all import DiGraph
+
+g = DiGraph()
+g.add_edge(Partition([1]), Partition([]))
+
+for height in range(1,n):
+for part in Partitions(height, max_part=k):
+part_k_conjugate = part.k_conjugate(k)
+for next_part in part.up():
+if max(next_part)  k:
+continue
+if not next_part.k_conjugate(k).contains(part_k_conjugate):
+continue
+g.add_edge(next_part, part)
+
+return Poset(g)

It was written before we started to work on k-shape (Marc is maybe the author)
and we don't use it at all. Anne: you probably will have some use for it and I
think it really belongs to k_tableau.py. So instead of renaming the file, I'd
rather removing it from kshape-om.patch and fold it in your patch. What do you
think ? If you are ok, I'll split our patch into to leaving to Anne to copy
this code in her file,

Cheers,

Florent

-- 
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] kshape-om

2012-01-09 Thread Florent Hivert
On Mon, Jan 09, 2012 at 08:30:16AM -0800, Anne Schilling wrote:
 Hi Florent,
 
 I do not think this code belongs in k_tableau.py. It more or less replicates
 the poset constructed by tau.weak_le(kappa) in Core, which is now already
 integrated into sage.
 
 You can either rename it in your patch or throw it out.

If the functionality is already there in a cleaner form, I'll simply remove
it.

Cheers,

Florent

-- 
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] Re: dot2tex, combinat

2011-12-18 Thread Florent Hivert
  Hi Bruce,

On Sun, Dec 18, 2011 at 08:51:29PM +, Sagan, Bruce wrote:
 I am now one step further: I can open the sage shell as explained in the
 README document (thanks, Nicolas, for pointing me to it).  But then I have
 two problems.

 (1) My mouse arrow disappears making it impossible to do anything except
  type in the sage window.

Have you tried Escape ? Shift+escape ? Ctrl+Escape ? 

 (2) I tried a number of commands to try an install dot2tex: sage -i
 dot2tex -i dot2tex install dot2tex and they all gave me syntax errors.
 Thanks for any further help you can give me.

What is the precise error message ? Are you in the right directory ? Did you
try ./sage ... instead of sage ...

Cheers,

Florent

-- 
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.



[sage-combinat-devel] Sage coding sprint in Orsay

2011-11-24 Thread Florent Hivert
  Dear all,

   I'm thinking about organizing a small one-week coding sprint around
January-February in the south-west of Paris. Following the *-combinat
tradition I plan to reserve the Guest house at Cernay-la-Ville:

http://www.cernayvacances.com/CEngels.html (the tower)

It is very nice an cosy, 35 minutes train + 15 minutes bus away from downtown
Paris. It can accommodate 8-10 people, if needed there is another adjacent
Guest house. We currently plan to work on the following themes:

 - Refactoring of the combinatorics infrastructure (factories, Cythonizing
   partitions, compositions...)
 - Categories (Morphisms, functorial constructions, optimization, coercion ?)

   I don't have yet secured a funding, but if we go for Cernay, the lodging
will be very cheap. So my questions are the following:
 - who is interested ?
 - what is the preferred week ?
 - any thematic suggestion,

Once I manage to create it, please answer on

  http://wiki.sagemath.org/combinat/SageCombinatDaysCernay2012

Cheers,

Florent

-- 
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.



[sage-combinat-devel] Segfault in DiGraph.automorphism_group

2011-11-22 Thread Florent Hivert
  Hi there,

I want to report a segfault in DiGraph.automorphism_group.

 On my machine the following code creates a segfault if
 finite_semigroup-nt.patch is applied and works if not. 
 
 sage: G = DiGraph()
 sage: G.add_vertices([1, 6, 9])
 sage: G.add_edges([(9, 1, None), (9, 6, None)])
 sage: G.automorphism_group()
 
 
 Can someone confirm that the segfault happen on other machine ?
 
 For Nicolas: could it be related to the recent work on categories ?

We (Nicolas  myself) tracked back the segfault and found that it was
triggered by the category system but it should have nothing to do with it. The
problem seems to been raised by an early import of DiGraph.

Here is a simple way to trigger the segfault:

Starts from vanilla sage-4.7.2 together with the following patch:


# HG changeset patch
# Parent 9e29a3d84c48c399daaf3920bcb8b17273a0e876
diff --git a/sage/categories/all.py b/sage/categories/all.py
--- a/sage/categories/all.py
+++ b/sage/categories/all.py
@@ -39,6 +39,8 @@ from finite_monoids import FiniteMonoids
 from finite_groups import FiniteGroups
 from finite_permutation_groups import FinitePermutationGroups
 
+from sage.graphs.digraph import DiGraph
+
 # fields
 from number_fields import NumberFields


Then,

sage: DiGraph().automorphism_group()

Kaboom !!!

I don't think I'll have time to investigate this further. Should I open a
ticket ?

Cheers,

Florent

-- 
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.



[sage-combinat-devel] Reject in the queue

2011-11-21 Thread Florent Hivert
  Dear Nicolas,

On sage-4.7.2, I got the following reject:

application de iter_method_for_integer_vectors-nb.patch
patching file sage/combinat/integer_vector.py
Hunk #1 FAILED at 30
1 out of 2 hunks FAILED -- saving rejects to file 
sage/combinat/integer_vector.py.rej
l'application du patch a échoué, impossible de continuer (essayez avec -v)
patch failed, rejects left in working dir
des erreurs se sont produites durant l'application, veuillez corriger puis 
rafraîchir iter_method_for_integer_vectors-nb.patch

Can you check it ?

Cheers,

Florent

-- 
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.



[sage-combinat-devel] Tabs in patches...

2011-11-21 Thread Florent Hivert
  Hi there,

I'd like to remind you that putting tabulation is Python code is dangerous and
that it is forbidden in sage. Using grep I found that the following patches
contains tabulations:

popcorn-*inat/.hg/patches $ grep -l $'+\t' *
affinization-bj.patch
bigmess-nt.patch
kschur-as.patch
mupad-interface-improve-fh.patch
origami_lyapunov_exponents-vd.patch
origami-vd.patch
sage-4.3.1.patch
sage-4.3.2.patch
sage-4.3.3.patch
sage-4.4.patch
sage-4.6.2.patch
sage-demos-and-tutorials-nt.patch
subword_c_generators-vd.patch
trac_10485-thematic-tutorial-as.patch
trac_10819-cluster_complex-cs.patch
trac_11251-sphinx_todo_extension-fh.patch
trac_6618_view_viewer_tightpage-followup-nt.patch
trac_7922-rebased-4.7.alpha2.patch
trac_8886-objects-classes_tutorial-fh-jhp.patch
unpickle-doc-nt.patch
words_ng-cpp_basic_string.patch

You probably want to take care of them as well as checking the configuration
of you favorite editor. In emacs, putting 

(setq indent-tabs-mode nil)

in your .emacs should do the job.

Cheers,

Florent

-- 
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.



[sage-combinat-devel] Trees and labels

2011-11-21 Thread Florent Hivert
  Hi Frederic,

I'm trying to finish the cleanup of trees, so that they could enter sage. The
questions here are mostly for Frederic Chapoton but other may have insight.

1 - I use always labelled with two ls but you wrote canonical_labeling. It
seems that both are Ok in English. Are you Ok to rename it with two ls,
possibly breaking your own code ?

2 - I think it could be good to extend canonical labelling to allow for
various kind of labelling (depth first left-to-rigth, prefix,
infix...). However, I'd rather postpone it to another ticket. In the mean
time, do you need a particular labelling or are you ok to write the
following in the doc ?

The actual canonical labelling is currently unspecified. It is guaranteed
two have labels in `1...n` where `n` is the number of node of the tree.
Moreover, two (unlabelled) trees compare as equal if and only if they
canonical labelled trees compare as equal.

Cheers,

Florent

-- 
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.



[sage-combinat-devel] Segfault after applying finite_semigroup-nt.patch

2011-11-21 Thread Florent Hivert
  Hi there,

On my machine the following code creates a segfault if
finite_semigroup-nt.patch is applied and works if not. 

sage: G = DiGraph()
sage: G.add_vertices([1, 6, 9])
sage: G.add_edges([(9, 1, None), (9, 6, None)])
sage: G.automorphism_group()


Can someone confirm that the segfault happen on other machine ?

For Nicolas: could it be related to the recent work on categories ?

Cheers,

Florent

-- 
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] Segfault after applying finite_semigroup-nt.patch

2011-11-21 Thread Florent Hivert
On Mon, Nov 21, 2011 at 03:12:46PM +0100, Christian Stump wrote:
  On my machine the following code creates a segfault if
  finite_semigroup-nt.patch is applied and works if not.
 
     sage: G = DiGraph()
     sage: G.add_vertices([1, 6, 9])
     sage: G.add_edges([(9, 1, None), (9, 6, None)])
     sage: G.automorphism_group()
 
 my machine returns
 
 sage:sage: G.automorphism_group()
 Permutation Group with generators [(1,3)]
 
 with 4.7.2.

Even with finite_semigroup-nt.patch applied ?

Cheers,

Florent

-- 
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] ClonableElement and Parent compatibility

2011-10-16 Thread Florent Hivert
  Hi Nicolas,

 I am trying to finalise the module enumerating integer vectors modulo
 the action of a permutation group. In order to benefit as much as I can
 of the useful features already available, I was converting my integer
 vectors in nice ClonableIntArray instead of simple python lists.
 
 I just found a micro incompatibility between ClonableIntArray and
 Parent. Here is a minimal example:
 
 *
 sage: class Myparent(Parent):
 : class Element(ClonableIntArray):
 : def check(self):
 : pass
 : 
 sage: B = Myparent()
 sage: B.element_class(B, [0,0,0])
 [0, 0, 0]
 sage: B.element_class(parent=B, [0,0,0])
 
File ipython console, line 1
 SyntaxError: non-keyword arg after keyword arg (ipython console, line
 1)

This has nothing to do neither with Parent or ClonableIntArray. Python's
syntax of function call forbid non keyword arg after keyword arg.

sage: def fun(a, b):
: pass
sage: fun (a=1, 2)

   File ipython console, line 1
SyntaxError: non-keyword arg after keyword arg (ipython console, line 1)

Also I can't reproduce you behavior:

--
| Sage Version 4.7.1, Release Date: 2011-08-11   |
| Type notebook() for the GUI, and license() for information.|
--
sage: class MyParent(Parent):
: class Element(ClonableIntArray):
: def check(self):
: pass
: 
sage: B = MyParent()
sage: B([0,0,0])
---
NotImplementedError   Traceback (most recent call last)

/home/florent/ipython console in module()

/home/florent/src/Sage/sage/local/lib/python2.6/site-packages/sage/structure/parent.so
 in sage.structure.parent.Parent.__call__ (sage/structure/parent.c:6915)()

NotImplementedError: 

Which version of sage are you using ?


Cheers,

Florent

-- 
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] core and quotient...

2011-08-07 Thread Florent Hivert
  Hi Anne,

 Mike pointed out to me that in your patch kshape-om.patch there
 are functions such as k_boundary, k_interior, k_shape. In addition
 to is_core, it would be good to have this in sage soon.
 
 +1
 
 What is your timeline for your patch? When do you plan to post it on
 trac? If not soon, would it be ok to put these functions into a
 separate patch, together with ktableau and KCore, and have them
 integrated fairly soon?
 
 Currently the patch contains a lot of highly experimental stuff. I do have 
 now
 a conjectural bijection so it is highly possible that from the research point
 of view, things finish by stabilizing soon, but I don't think we will find 
 the
 time to clean it up in order to integrate it in sage. So I think it would be
 good to have them in a separate patch.
 
 Oliver do you have any modif on the k-shape patch ? Can I refresh it ?
 
 By the way, as far as I know Andrew Mathas changed k_core and r_core
 to just core (same for quotient). By the same logic, should
 KCore and KCores become just Core and Cores?
 
 +1
 
 Great! Will you or Olivier take care of this integration into sage (and add 
 the is_core
 method which should be easy)?

I got no news from Olivier and I'll be still offline for the next two
weeks. So feel free to cut in the patch kshape-om. I'll do the cutting if you
don't find the time inbetween.

Cheers,

Florent

-- 
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] conflict in trac_9128-sphinx_links_all-fh.patch

2011-08-02 Thread Florent Hivert
On Mon, Aug 01, 2011 at 04:56:40PM -0700, Christian Stump wrote:
 Salut,
 
 there is a conflict in trac_9128-sphinx_links_all-fh.patch. Could
 someone (maybe Florent, if it is that patches fault) please solve it.

As usual, could you be more specific (sage-version... etc, did you correctly
update your guard with sage -conbinat qselect or sage -update). It is ok on my
computer with a sage-combinat install one week old. I'm on a extremely sloppy
network and sage-combinat server is down. So there is nothing I can do
now. Sorry...

Cheers,

Florent

-- 
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.



[sage-combinat-devel] For the info...

2011-07-15 Thread Florent Hivert
  Hi There,

The patch queue applies verbatim of sage-4_7_1.rc0 !
34 patches merged from the queue ! Good work guys !

Cheers,

Florent

-- 
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] Re: installation sage-combinat

2011-07-13 Thread Florent Hivert
  Bonjour,

On Wed, Jul 13, 2011 at 01:16:51PM +0200, Nicolas M. Thiery wrote:
 On Wed, Jul 13, 2011 at 12:35:09PM +0200, Sophie Morier-Genoud wrote:
  J'essaye d'installer sage-combinat sur mon iMac, en suivant scrupuleusement 
  des instructions trouvees en ligne, mais je recois le message suivant:
  
  applying trac_11287-runsnake-nt.patch
  patching file doc/en/reference/misc.rst
  Hunk #1 FAILED at 8
  1 out of 1 hunks FAILED -- saving rejects to file 
  doc/en/reference/misc.rst.rej
  patching file sage/misc/all.py
  patching file sage/misc/dev_tools.py
  patching file sage/misc/misc.py
  Hunk #1 succeeded at 2361 (offset -44 lines).
  Hunk #2 succeeded at 2448 (offset -44 lines).
  patching file sage/misc/profiler.py
  patching file sage/misc/sage_timeit_class.pyx
  patch failed to apply
  adding sage/misc/dev_tools.py
  doc/en/reference/misc.rst
  sage/misc/all.py
  sage/misc/dev_tools.py
  sage/misc/misc.py
  sage/misc/profiler.py
  sage/misc/sage_timeit_class.pyx
  patch failed, rejects left in working dir
  errors during apply, please fix and refresh trac_11287-runsnake-nt.patch
  Abort
  
  Je suis bien incapable de comprendre ce que ca veut dire, et de trouver une 
  solution.
  Que faut-il faire?

Which sage version are you using ?

Cheers,

Florent

-- 
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] Re: installation sage-combinat

2011-07-13 Thread Florent Hivert
  Hi,

  On Wed, Jul 13, 2011 at 01:16:51PM +0200, Nicolas M. Thiery wrote:
  On Wed, Jul 13, 2011 at 12:35:09PM +0200, Sophie Morier-Genoud wrote:
  J'essaye d'installer sage-combinat sur mon iMac, en suivant 
  scrupuleusement des instructions trouvees en ligne, mais je recois le 
  message suivant:
  
  applying trac_11287-runsnake-nt.patch
  patching file doc/en/reference/misc.rst
  Hunk #1 FAILED at 8
  1 out of 1 hunks FAILED -- saving rejects to file 
  doc/en/reference/misc.rst.rej
  patching file sage/misc/all.py
  patching file sage/misc/dev_tools.py
  patching file sage/misc/misc.py
  Hunk #1 succeeded at 2361 (offset -44 lines).
  Hunk #2 succeeded at 2448 (offset -44 lines).
  patching file sage/misc/profiler.py
  patching file sage/misc/sage_timeit_class.pyx
  patch failed to apply
  adding sage/misc/dev_tools.py
  doc/en/reference/misc.rst
  sage/misc/all.py
  sage/misc/dev_tools.py
  sage/misc/misc.py
  sage/misc/profiler.py
  sage/misc/sage_timeit_class.pyx
  patch failed, rejects left in working dir
  errors during apply, please fix and refresh trac_11287-runsnake-nt.patch
  Abort
  
  Je suis bien incapable de comprendre ce que ca veut dire, et de trouver 
  une solution.
  Que faut-il faire?

  Which sage version are you using ?

 I'm using 6.4.2

Who ! You should publish your sage version at once ! The rest of us is
struggling getting 4.7.1 out :-) !

Seriously. I'm assuming you are on 4.6.2. Can you please double check it ?

I can't manage to reproduce the problem on my 4.6.2. I'd like you to get back
to a clean sage install. Please go to your sage root directory and issue the
following two of commands:

./sage -b main
rm -rf devel/sage-combinat

Then please try again:

./sage -combinat install

If it still fails, Please send the following three files:

   $SAGE_ROOT/devel/sage-combinat/doc/en/reference/misc.rst
   $SAGE_ROOT/devel/sage-combinat/doc/en/reference/misc.rst.rej
   $SAGE_ROOT/devel/sage-main/doc/en/reference/misc.rst

Cheers,

Florent

-- 
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] Re: installation sage-combinat

2011-07-13 Thread Florent Hivert
On Wed, Jul 13, 2011 at 02:48:38PM +0200, Sophie Morier-Genoud wrote:
 
 Le 13 juil. 2011 à 14:12, Florent Hivert a écrit :
 
   Hi,
  
  On Wed, Jul 13, 2011 at 01:16:51PM +0200, Nicolas M. Thiery wrote:
  On Wed, Jul 13, 2011 at 12:35:09PM +0200, Sophie Morier-Genoud wrote:
  J'essaye d'installer sage-combinat sur mon iMac, en suivant 
  scrupuleusement des instructions trouvees en ligne, mais je recois le 
  message suivant:
  
  applying trac_11287-runsnake-nt.patch
  patching file doc/en/reference/misc.rst
  Hunk #1 FAILED at 8
  1 out of 1 hunks FAILED -- saving rejects to file 
  doc/en/reference/misc.rst.rej
  patching file sage/misc/all.py
  patching file sage/misc/dev_tools.py
  patching file sage/misc/misc.py
  Hunk #1 succeeded at 2361 (offset -44 lines).
  Hunk #2 succeeded at 2448 (offset -44 lines).
  patching file sage/misc/profiler.py
  patching file sage/misc/sage_timeit_class.pyx
  patch failed to apply
  adding sage/misc/dev_tools.py
  doc/en/reference/misc.rst
  sage/misc/all.py
  sage/misc/dev_tools.py
  sage/misc/misc.py
  sage/misc/profiler.py
  sage/misc/sage_timeit_class.pyx
  patch failed, rejects left in working dir
  errors during apply, please fix and refresh trac_11287-runsnake-nt.patch
  Abort
  
  Je suis bien incapable de comprendre ce que ca veut dire, et de trouver 
  une solution.
  Que faut-il faire?
  
  Which sage version are you using ?
  
  I'm using 6.4.2
  
  Who ! You should publish your sage version at once ! The rest of us is
  struggling getting 4.7.1 out :-) !
  
  Seriously. I'm assuming you are on 4.6.2. Can you please double check it ?
  
  I can't manage to reproduce the problem on my 4.6.2. I'd like you to get 
  back
  to a clean sage install. Please go to your sage root directory and issue the
  following two of commands:
  
 ./sage -b main
 rm -rf devel/sage-combinat
  
  Then please try again:
  
 ./sage -combinat install
  
  If it still fails, Please send the following three files:
  
$SAGE_ROOT/devel/sage-combinat/doc/en/reference/misc.rst
$SAGE_ROOT/devel/sage-combinat/doc/en/reference/misc.rst.rej
$SAGE_ROOT/devel/sage-main/doc/en/reference/misc.rst
  
  Cheers,
  
  Florent
 oops, yes it's 4.6.2 ;)
 
 I just tried what you recommended. But it failed again and returned the same 
 message.
 I attach the files. Thanks for your help! Sophie

There something strange happening. What is the result of the command

   cd $SAGE_ROOT/devel/sage-combinat
   ../../sage -hg qapplied

Florent

-- 
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 when replacing a full tree

2011-07-04 Thread Florent Hivert
  Hi Frédéric,

On Mon, Jul 04, 2011 at 06:23:00AM -0700, Frédéric Chapoton wrote:
 I have found the following bug. When one tries to replace a full tree
 by another tree, using the *empty path* as an adress, this does not
 work.
 
 sage: lt=LabelledOrderedTrees()
 sage: toto=lt([lt([lt([],None)],None)],None)
 sage: titi=lt([lt([],'a')],'a')
 sage: toto[()]
 None[None[None[]]]
 sage: with toto.clone() as tc:
 : tc[()]=titi
 
 IndexError: tuple index out of range
 
 Florent, what do you think ?

This is unfortunate but expected. I can probably fix it but upto some
complication in the code. I the mean time please use tc = titi ?

Cheers,

Florent

-- 
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] Thematic tutorials

2011-07-02 Thread Florent Hivert
Dear Simon, dear Nicolas, dear thematic tutorials lovers

 On Sat, Jun 11, 2011 at 12:19:59PM -0700, Simon King wrote:
  At http://www.sagenb.org/home/pub/2813, I have published a worksheet
  that aims at explaining how one can implement a new parent and take
  advantage of both the category framework and the coercion model
  (including construction functors).

Excellent !!!

  In another thread, I suggested to proceed with documentation similar
  than with spkgs: I believe that it is better to make preliminary
  versions of tutorials available to the public (explicitly marking them
  as preliminary or draft) than to wait a couple of months until someone
  has provided a full review. In the best case, there is feed-back from
  the public, so that one has a cumulative review.
  
  In particular, I think that the tutorials from the combinat branch
  should be published soon as well.
 
 Yes, they should!
 
 Up to recently, there had been two obstacles:
 
  - Some sphinx technicalities (cross documentation links, ...) which
Florent et al. now solved, and should be in Sage now or soon.

By the way, the ticket about crosslink #9128 (which was a very though one for
me) is still needing review.

 So now, many of our tutorial should indeed just go into Sage. There is
 a tiny bit of work to:
 
 (1) Decide which tutorials are ready to go
 (2) Unfold the tutorials in separate patches (they currently are all
 in the sage-demos-and-tutorials-nt.patch in the Sage-Combinat
 queue)
 (3) Check each of them, and see that there are no non trivial
 dependencies with other things in the queue
 (4) Proofread and review.

Last week, I unfolded and submitted #8886: tutorial on Python object and
classes. It should be fairly independent from anything else.

Cheers,

Florent

-- 
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] operad morphisms and codomain

2011-07-02 Thread Florent Hivert
  Hi Frédéric,

Sorry for not answering sooner. I was giving a talk at Strasbourg at Kurush
and Frederic F. conference). So I was busy preparing my talk (among other
things).

 I have tried to implement a morphism of operads (from the PreLie
 operad to the Dendriform operad) but I have some problem with
 codomains. Could somebody help ?
 
 with my patch free_operads_fc.patch applied :
 
 sage: PL=PreLieOperad(QQ)
 sage: DO=DendriformOperad(QQ)
 sage: PLT=PL.basis().keys()
 sage: t0=PL(PLT([],'a'))
 sage: PL.operad_morphism(PL,t0)
 sage: PL.operad_morphism(DO,t0)
 
 the last two lines both returns an error related to codomain.

I had a look at your problem. One of the problem came from lazy_attribute in
operads_with_basis: you cannot use lazy_attribute with a something which takes
parameters. The role of lazy_attribute is (among other things) to save the
typing of () such as in PL.one(). One could have used PL.one but this was
ruled out for interface consistency reason.

Back to your problem, you can't spare a () because you have the codomain. So
you probably want to write things the following way:

sage: PL2PL = PL.operad_morphism(PL)   # define the morphism
sage: PL2PL(t0)# apply it
B[a[]]
sage: PL2DO = PL.operad_morphism(DO)
sage: PL2DO(t0)
B[a[None, None]]
sage: PL2DO(t0  t0)
-B[a[None, a[None, None]]] + B[a[a[None, None], None]]

Does this makes sens to you ?

I uploaded a patch named operad_morphism_fix-fh.patch which makes the previous
examples work. Please fold it in yours (after making sure that you don't have
any uncommited modifications:

sage -hg pull -u
sage -hg qgoto free_operads_fc.patch
sage -hg qfold operad_morphism_fix-fh.patch

And then as usual

cd ../../../.hg/patches
sage -hg commit -m Folded operad_morphism_fix-fh.patch
sage -hg push

I hope this fixes your problems. Just a remark: I checked that the code
returned a result not that this is indeed the correct result. Please quadruple
check.

Cheers,

Florent

-- 
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] Rejection...

2011-06-28 Thread Florent Hivert
On Tue, Jun 28, 2011 at 10:31:35AM +0200, groupe travail wrote:
 wich sage-4.7:
 
 application de trac_10998-categories-posets-nt.patch
 patching file sage/geometry/cone.py
 Hunk #1 FAILED at 1226
 1 out of 5 hunks FAILED -- saving rejects to file sage/geometry/cone.py.rej
 patching file sage/misc/sageinspect.py
 Hunk #1 succeeded at 654 with fuzz 2 (offset -291 lines).
 l'application du patch a échoué, impossible de continuer (essayez avec -v)
 patch failed, rejects left in working dir
 des erreurs se sont produites durant l'application, veuillez corriger puis 
 rafraîchir trac_10998-categories-posets-nt.patch

Oups ! Fixed.

Florent

-- 
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.



[sage-combinat-devel] NSF grant

2011-06-22 Thread Florent Hivert
   Dear sage/sage-combinat fan,

I just got the following e-mail. The dead-line is very short but this looks
interesting. It seems that sage or sage-combinat fits well in the call. What
do you think ?

Florent

- Forwarded message  -

Subject: appel d'offre NSF (participation internationale) sur logiciels

PROGRAM GUIDELINES
Solicitation  11-539
[voir le texte en ligne:
http://www.nsf.gov/funding/pgm_summ.jsp?pims_id=503489WT.mc_id=USNSF_39WT.mc_ev=click
]

DUE DATES
Full Proposal Deadline Date:  July 18, 2011

SYNOPSIS

Computation is accepted as the third pillar supporting innovation and discovery
in science and engineering and is central to NSF's vision of a
Cyberinfrastructure Framework for 21st Century Science and Engineering (CIF21)
(as described in http://www.nsf.gov/pubs/2010/nsf10015/nsf10015.jsp).

Software is an integral enabler of computation, experiment and theory and a
primary modality for realizing the CIF21 vision. Scientific discovery and
innovation are advancing along fundamentally new pathways opened by development
of increasingly sophisticated software. Software is also directly responsible
for increased scientific productivity and significant enhancement of
researchers' capabilities. In order to nurture, accelerate and sustain this
critical mode of scientific progress, NSF has established the Software
Infrastructure for Sustained Innovation (SI2) program, with the overarching
goal of transforming innovations in research and education into sustained
software resources that are an integral part of the cyberinfrastructure.

SI2 is a long-term investment focused on catalyzing new thinking, paradigms, and
practices in developing and using software to understand natural, human, and
engineered systems.  SI2's intent is to foster a pervasive cyberinfrastructure
to help researchers address problems of unprecedented scale, complexity,
resolution, and accuracy by integrating computation, data, networking,
observations and experiments in novel ways. It is NSF's expectation that SI2
investment will result in robust, reliable, usable and sustainable software
infrastructure that is critical to achieving the CIF21 vision and will
transform science and engineering while contributing to the education of next
generation researchers and creators of future cyberinfrastructure. Education at
all levels will play an important role in integrating such a dynamic
cyberinfrastructure into the fabric of how science and engineering is
performed.

It is expected that SI2 will generate and nurture the interdisciplinary
processes required to support the entire software lifecycle, and will
successfully integrate software development and support with innovation and
research. Furthermore, it will result in the development of sustainable
software communities that transcend scientific and geographical boundaries. SI2
envisions vibrant partnerships among academia, government laboratories and
industry, including international entities, for the development and stewardship
of a sustainable software infrastructure that can enhance productivity and
accelerate innovation in science and engineering. The goal of the SI2 program
is to create a software ecosystem that includes all levels of the software
stack and scales from individual or small groups of software innovators to
large hubs of software excellence. The program addresses all aspects of
cyberinfrastructure, from embedded sensor systems and instruments, to desktops
and high-end data and computing systems, to major instruments and facilities.
Furthermore, it recognizes that integrated education activities will play a key
role in sustaining the cyberinfrastructure over time and in developing a
workforce capable of fully realizing its potential in transforming science and
engineering.

The SI2 program includes three classes of awards:

1. Scientific Software Elements (SSE): SSE awards target small groups that will
create and deploy robust software elements for which there is a demonstrated
need that will advance one or more significant areas of science and
engineering.

2. Scientific Software Integration (SSI): SSI awards target larger,
interdisciplinary teams organized around the development and application of
common software infrastructure aimed at solving common research problems. SSI
awards will result in a sustainable community software framework serving a
diverse community.

3. Scientific Software Innovation Institutes (S2I2): S2I2 awards will focus on
the establishment of long-term hubs of excellence in software infrastructure
and technologies, which will serve a research community of substantial size and
disciplinary breadth.


This solicitation includes SSE and SSI awards only. It is anticipated that S2I2
awards will be competed in a separate future solicitation.

Prospective PIs should be aware that SI2 is a multi-directorate activity and are
encouraged to submit proposals for software with broad, interdisciplinary
interest. PIs are encouraged to refer 

[sage-combinat-devel] Backport...

2011-06-10 Thread Florent Hivert
  Hi There,

For the info, I just backported
   Ticket #11389: Speed up list * Integer
which is merged in sage-4.7.1-alpha3. It has very few to do with combinatorics
but it prevent a slow-down of matrix creation by several order of magnitude.

Cheers,

Florent

-- 
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] Naming convention

2011-06-08 Thread Florent Hivert
On Tue, Jun 07, 2011 at 06:16:09PM +0200, Martin Rubey wrote:
 Anne Schilling a...@math.ucdavis.edu writes:
 
  Sure; Sorry for the typo. Here is what my current code does:
 
  sage: for i in DyckWords(3):
  : print i, i.return_to_zero()
  :
  /\/\/\ [0, 2, 4, 6]
  /\
  /\/  \ [0, 2, 6]
/\
  /  \/\ [0, 4, 6]
/\/\
  /\ [0, 6]
 /\
/  \
  /\ [0, 6]
 
 
  position_of_zeroes?
 
 I would prefer number_of_returns.

I think you would prefer returns: as you can see this is the position not
their number that I am computing. Also, I'm not sure including 0 is a good
idea. 

  number_of_initial_rises
 
 Isn't that misleading? Wouldn't it be length_of_initial_rise?  In any
 case, I know it as height_of_first_peak :-)

I like the idea that many statistic have their name starting by number_of_...

Next question: any one knows a better name for what I name below a Catalan
code:

A Catalan code is a list of integer l such that `l_0 = 0` and
`0 \leq l_{i+1} \leq l_i + 1` for `i  0`

Cheers,

Florent

-- 
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.



[sage-combinat-devel] Naming convention

2011-06-07 Thread Florent Hivert
  Hi there,

I'm working with Dyck words and binary trees and I'm looking for name for the
following functions:

  - for a dyck word [1,1,0,0,1,0], return its reversed, exchanging open to
close [1,0,1,1,0,0]
  - for a binary tree, recursively exchange left and right branches.

for a dyck word dw (considered as a path):

  - the x coordinate of the point of height 0
  - the number of opening parentheses at the beginning of dw

Thanks for any help.

Florent

-- 
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] Naming convention

2011-06-07 Thread Florent Hivert
  Hi Anne,

 I'm working with Dyck words and binary trees and I'm looking for name for the
 following functions:
 
- for a dyck word [1,1,0,0,1,0], return its reversed, exchanging open to
  close [1,0,1,1,0,0]
 
 You could call this Schuetzenberger involution; on words it complements and
 then reverses all letters.

Nice idea. However I'm not sure that in the context of DyckWord people will
understand it. 

- for a binary tree, recursively exchange left and right branches.
 
 for a dyck word dw (considered as a path):
 
- the x coordinate of the point of height 0
 
 Do you mean points, not point, since there could be several?

Sure; Sorry for the typo. Here is what my current code does:

sage: for i in DyckWords(3):
: print i, i.return_to_zero()
: 
/\/\/\ [0, 2, 4, 6]
   /\ 
/\/  \ [0, 2, 6]
 /\   
/  \/\ [0, 4, 6]
 /\/\ 
/\ [0, 6]
  /\  
 /  \ 
/\ [0, 6]

- the number of opening parentheses at the beginning of dw
 
 initial_rise?

Good idea: I'll add number somewhere:

 - number_of_initial_rise
 - initial_rise_number

The first is consistent with

perfect_matching.py:def number_of_loops(self,other=None):
perfect_matching.py:def number_of_crossings(self):
perfect_matching.py:def number_of_nestings(self):
permutation.py:def number_of_inversions(self):
permutation.py:def number_of_fixed_points(self):
permutation.py:def number_of_recoils(self):
permutation.py:def number_of_descents(self, final_descent=False):
permutation.py:def number_of_idescents(self, final_descent=False):
permutation.py:def number_of_peaks(self):
permutation.py:def number_of_saliances(self):

Cheers,

Florent

-- 
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.



[sage-combinat-devel] Rebase...

2011-05-31 Thread Florent Hivert
  Hi Christian,

I saw that you tried to rebase my essai.patch. It should not have left my
computer. Sorry for that. I deleted both my patch and your rebase patch.

Please tell me if someone has still some reject on that one.

Cheers,

Florent

-- 
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] caching basis in free modules

2011-05-30 Thread Florent Hivert
  Hi,

On Mon, May 30, 2011 at 09:43:24AM +0200, Nicolas M. Thiery wrote:
 On Sun, May 29, 2011 at 11:35:46PM +0200, Florent hivert wrote:
  That would surprise me because I added it and got no conflict.
 
 You don't necessarily get a conflict when the changes are perfectly
 identical. That being said, I indeed don't find my change. I must have
 just done it temporarilly when I ran a specific computation. So anyway
 +1 on the change!
 
free_module_basis_cache-fh.patch
  
  Should I create a ticket and submit it alone ?
 
 Please go ahead!

This is the one line patch #11402, ready for review.

Cheers,

Florent

-- 
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.



[sage-combinat-devel] Trac server problem...

2011-05-30 Thread Florent Hivert
  Hi there,

I currently quite often got internal server error from the trac
server. Retrying a few time seems to work. Is there a maintenance or something
going on ?

Cheers,

Florent

-- 
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] Trac server problem...

2011-05-30 Thread Florent Hivert
On Mon, May 30, 2011 at 01:56:08PM +0200, groupe travail wrote:
   Hi there,
 
 I currently quite often got internal server error from the trac
 server. Retrying a few time seems to work. Is there a maintenance or something
 going on ?

Oups ! Wrong list. Sorry.

Florent

-- 
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] caching basis in free modules

2011-05-29 Thread Florent Hivert
On Sun, May 29, 2011 at 11:27:06PM +0200, Nicolas M. Thiery wrote:
 On Fri, May 27, 2011 at 03:40:03PM +0200, Florent hivert wrote:
  Runsnake (thanks Nicolas !) just told me that some code spent 90% of its 
  time
  constructing families. The reason is that to construct elements of a
  CombinatorialFreeModule the code goes through self.basis() and that the 
  method
  basis is *not* cached. Since families doesn't have UniqueRepresentation the
  initialisation code is executed many times... I know that it should written
  using monomial, but the original writer of the code didn't because the 
  example
  always construct element using the basis. I think that unless you want to
  achieve ultimate speed this is a perfectly reasonable ways to write it. So 
  the
  question is:
  
  Is there any reason why not having CFM.basis() cached ?
  
  Note adding the cache still passes the tests !
 
 If I remember correctly, that's already in one of my patches (I don't
 remember which one though; probably the bigmess).

That would surprise me because I added it and got no conflict. See

  free_module_basis_cache-fh.patch

Should I create a ticket and submit it alone ?

Cheers,

Florent

-- 
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.



[sage-combinat-devel] caching basis in free modules

2011-05-28 Thread Florent Hivert
  Hi There,

Runsnake (thanks Nicolas !) just told me that some code spent 90% of its time
constructing families. The reason is that to construct elements of a
CombinatorialFreeModule the code goes through self.basis() and that the method
basis is *not* cached. Since families doesn't have UniqueRepresentation the
initialisation code is executed many times... I know that it should written
using monomial, but the original writer of the code didn't because the example
always construct element using the basis. I think that unless you want to
achieve ultimate speed this is a perfectly reasonable ways to write it. So the
question is:

Is there any reason why not having CFM.basis() cached ?

Note adding the cache still passes the tests !

Cheers,

Florent

-- 
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.



[sage-combinat-devel] subposet is very slow...

2011-05-26 Thread Florent Hivert
  Dear posets fan,

I was trying to use the subposet method of posets and I find it extremely
slow. I'll post a ticket together with a patch when I'll connect to a network
(I'm currently on the sea shore ;-).

The main reason why it is slow is because to construct a subposet of
cardinality 23 of a poset of cardinality 24 (I'm just removing the lower
element) the code has to perform no less that 38679 equality comparison !

At the end most of the time (0.216s out of 0.237s) was spent inside
_element_to_vertex for the following reason: the poset P is a non facade poset
for a set W. But before my patch the code was comparing element of W and not
P. Here is what happen if you call P.is_less_that(x,y) when x and y are in W
and not in P:

def is_less_than(self, x, y):
return self.compare_elements(x,y) == -1

then

def compare_elements(self, x, y):
i, j = map(self._element_to_vertex,(x,y))
[...]

And that's where things start to go crazy:

def _element_to_vertex(self,x):
if x in self:
return self(x).vertex
else:
raise ValueError, element (=%s) not in poset%x

So there is a call to contains:

def __contains__(self,x):
if isinstance(x,self.element_class):
[...]
return x in self._elements# list search 1 here

So x is compared to the each element of self._elements until it is found.
Then there is a call to self(x).vertex:

def __call__(self,element):
if isinstance(element, self.element_class) and element.parent() == self:
return element
elif element in self._elements:   # list search 2 here
return self.element_class(self, element,
self._elements.index(element)) # list search 3 here

Once again in elif element in self._elements element=x is compared to the
element of self._element... and then:

self._elements.index(element))

if two times where not enough it is seached again just to be sure that
element=x is really in self._elements...

I fixed subposet not to call this anymore but I think this should definitely
be fixed... I suggest the following fix:

1 - _element_to_vertex should'nt do any check. This is the responsibility of
__call__

def _element_to_vertex(self,x):
return self(x).vertex

2 - use exception properly to handle the case where the element is not in the
poset, without to search for it in the list.

I'll put a second patch on trac for this one. Comments are mostly welcome !

Cheers,

Florent

-- 
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.



[sage-combinat-devel] QSym

2011-05-23 Thread Florent Hivert
  Hi Jason,

There is an extremely good chance that I have to work on qsym this week. Are
you still working on it ? What is the status ? Can I take ownership of the
patch ?

Cheers,

Florent

-- 
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.



[sage-combinat-devel] Rejection on trac_10335-permgroup_domain-mh_rebase-cs.patch

2011-05-23 Thread Florent Hivert
Hi

On sage-4.6.2 I got:

application de trac_10335-permgroup_domain-mh_rebase-cs.patch
patching file sage/groups/perm_gps/permgroup.py
Hunk #1 FAILED at 1636
1 out of 1 hunks FAILED -- saving rejects to file 
sage/groups/perm_gps/permgroup.py.rej
l'application du patch a échoué, impossible de continuer (essayez avec -v)
patch failed, rejects left in working dir
des erreurs se sont produites durant l'application, veuillez corriger puis 
rafraîchir trac_10335-permgroup_domain-mh_rebase-cs.patch

I guarded the patch:

trac_10335-permgroup_domain-mh_rebase-cs.patch #+4.6.2

Cheers,

Florent

-- 
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] QSym

2011-05-23 Thread Florent Hivert
  Hi Jason,

Thanks for your quick answer:

I already added FreeQSym !!!

 I am not currently working on the qsym code, and any improvements you
 would like to make are very welcome!

I'll start by adding doctests ;-) !

 Feel free to ask if you have any questions about anything.

Thanks,

Florent

-- 
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.



[sage-combinat-devel] Re: cython

2011-05-09 Thread Florent Hivert
  Hi Christian,

 I just pushed a new version of the cyclotomics. I figured that it is
 quite fast to cache several functions in the cython code as they were
 often called with the same input... Can you send me the webpage you
 showed me on Friday on how to work with Numpy arrays?

I tried hard to improve more the speed of your code and so far I failed:

sage: %timeit ZD(2^2*3^2*5^3, 122521)
625 loops, best of 3: 55.2 µs per loop
sage: %timeit ZumbroichDecomposition(2^2*3^2*5^3, 122521)
625 loops, best of 3: 50.4 µs per loop

My analysis for this failure is the following:

You code is doing a lot more copy of the arrays/dicts than access. Replacing a
dict by an array speedup access but the relative speeds of copy essentially
depend on the size and not that much gain can be expected here. Currently, my
code is 10% slower than yours. This extra time is spend when I translate your
dict input i_mod_n_repr( n, i ) to my array

i_mod_n_dict = i_mod_n_repr( n, i )

Then, I'm probably slightly faster than you. So if you change i_mod_n_repr so
that is returns an array rather than a dict, you probably could get a little
speedup. I didn't had the time to go there. As it require, to understand more
the internal of the code. Changing all of this to hardcore C code with malloc
and free could speed up it quite more but I've no idea if this is worth the
work. Maintenance would be much more difficult.

As you figured out, the main question is: do you expect than this machinery is
called with a lot more different n and i ? If not, caching is certainly the
right way to go.

I pushed a patch falsely named
   +trac_8327_universal_cyclotomic_field_speedup-fh.patch
please have a look at it and take ownership of it if you want. Unless you ask
me to try some more experiment, I won't modify it further.

Cheers,

Florent


 
 Thanks, Christian

-- 
Florent Hivert
  ---
   Il y a trois sortes de gens dans le monde : ceux qui savent compter et
ceux qui ne savent pas.
   There are three kinds of people in the world: those who can count,
and those who cannot.
  ---
Professeur, Coordinateur équipe Combinatoire et Algorithmes
Laboratoire d'Informatique, de Traitement de l'Information
  et des Systèmes (EA 4108)

Bureau U2.2.11  --  Campus du Madrillet
Université de Rouen --  Faculté des Sciences et des Techniques
Avenue de l'université  --  76801 SAINT ETIENNE DU ROUVRAY
Tél. : 02.32.95.52.91   --  Fax : 02.32.95.51.87
Mél. : florent.hiv...@univ-rouen.fr

-- 
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] Re: cython

2011-05-09 Thread Florent Hivert
  Hi Christian,

  I tried hard to improve more the speed of your code and so far I failed:
 
 Thanks for posting the patch!
 
 I just had a look at the code, and I think, I can, at least, already
 return the right arrays from i_mod_n_repr. I will try these days...

My code is completely experimental, poorly documented and should be checked by
a Cython/numpy expert. I would love it if you can gain a non negligible
speedup from it. However, without going to C, I'm not sure you can have more
than a 1.2 maybe 1.5 speedup. If, on the path you gain more knowledge this is
certainly worth it (that's why I tried). Make sure that you won't loose too
much time. Anyway, feel free to ask for more informations on what I wrote and
tried.

Cheers,

Florent

-- 
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.



  1   2   3   >