class COMBI_NR_STREAM |
---|
**** | generate all combinations of {1..n} C(n,r) by lexical order. K.Kodama |
attr num:INT; |
---|
attr pos:ARRAY{INT}; |
---|
**** | 1<=pos[i]<=n-r+i |
attr rank:INT; |
---|
attr num:INT; |
---|
attr pos:ARRAY{INT}; |
---|
**** | 1<=pos[i]<=n-r+i |
attr rank:INT; |
---|
create(n,r:INT):SAME |
---|
get(out c:ARRAY{INT}):BOOL |
---|
**** | format: [0, combination of 1 to n ] For C(n,0). return |0| once. |