Bill Allombert on Mon, 03 Jun 2013 11:43:28 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: new GP loop: forpart() |
On Sat, Jun 01, 2013 at 07:46:15PM +0200, Joerg Arndt wrote: > * Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr> [May 30. 2013 14:06]: > > Dear PARI developers, > > > > I have commited a patch by Pascal and myself that adds GP function > > to loop over partitions: > > > > forpart(v=5,print(v)) > > Vecsmall([1,1,1,1,1]) > > Vecsmall([1,1,1,2]) > > Vecsmall([1,2,2]) > > Vecsmall([1,1,3]) > > Vecsmall([2,3]) > > Vecsmall([1,4]) > > Vecsmall([5]) > > > > Also I have changed the partitions function to provide the same interface > > as forpart. An unfortunate side effect is that the order of the partitions > > is reversed. > > With "reversed" you mean: they are lists in ascending order? No: they are listED in ascending order, see the example above. > Please see > http://jjj.de/fxt/demo/comb/index.html#partition-asc > programmed and uploaded a minute ago. There, in > http://jjj.de/fxt/demo/comb/partition-asc.h > see the method prev() Could you write a GP function that take a partition and return the previous one according to forpart order, and that work even when abound and nbound are specified ? Cheers, Bill.