Function pinocchio::internal::generateCombination

Function Documentation

void pinocchio::internal::generateCombination(const int n, const int k, Eigen::VectorXi &indices)

Return a subsequence of length k of elements from range 0 to n. Inspired by https://docs.python.org/3/library/itertools.html#itertools.combinations. Indices table will hold the results.

Parameters:
  • n[in] Max range of element

  • k[in] length of subsequences

  • indices[out] results of the combination