RobinHankin / partitions

R package for integer partitions
9 stars 5 forks source link

Restricted partitions are not correctly ordered #43

Open stla opened 3 months ago

stla commented 3 months ago

Hello Robin. I'm surprised I didn't notice the following point earlier. The partitions returned by restrictedparts are not correctly ordered:

> restrictedparts(6, 3)

[1,] 6 5 4 3 4 3 2
[2,] 0 1 2 3 1 2 2
[3,] 0 0 0 0 1 1 2
RobinHankin commented 3 months ago

hi there! [got back from userR 2024 Salzburg literally a few minutes ago].

Function restrictedparts() is just an implementation of the algorithm in Andrews, which I don't have to hand right now. So it is behaving as intended. I'll leave open as the documentation is not particularly clear on this point.

Best wishes - rksh.