Return the number of compositions for k summands and a sum of n
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | k | |||
| integer, | intent(in) | :: | n |
Return the next composition.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | previous(:) |
Get the ordered compositions of n into k summands.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | k | |||
| integer, | intent(in) | :: | n |
Return the composition index for a given composition.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | composition(:) |
Return the composition for a given composition index
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | k |
|
||
| integer, | intent(in) | :: | N |
|
||
| integer(kind=int64), | intent(in) | :: | idx |
The composition index. |