Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ combination()

void stan::math::internal::combination ( Eigen::Matrix< int, Eigen::Dynamic, 1 > &  c,
const int  dim,
const int  p,
const int  x 
)
inline

Get the [x]-th lexicographically ordered set of [p] elements in [dim] output is in [c], and should be sizeof(int)*[p] "Algorithm 515: Generation of a Vector from the Lexicographical Index"; Buckles, B.

P., and Lybanon, M. ACM Transactions on Mathematical Software, Vol. 3, No. 2, June 1977. User lucaroni from https://stackoverflow.com/questions/561/how-to-use-combinations-of-sets-as-test-data#794

Parameters
[out]coutput vector
dimdimension
pnumber of elements
xx-th lexicographically ordered set

Definition at line 73 of file hcubature.hpp.