Description Usage Arguments Details Value References
Given a combination x
, computes its position out of all lexicographically-ordered (n
choose 2
) combinations.
1 | sub_to_nat(x, n)
|
x |
matrix whose columns represent |
n |
numerator of the binomial coefficient |
The mapping is done via an lexicographically-ordered combinadic mapping.
integer vector of the positions of the given combinations.
McCaffrey, J. D. "Generating the mth lexicographical element of a mathematical combination." MSDN Library (2004).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.