Function pinocchio::internal::productCombination

Function Documentation

void pinocchio::internal::productCombination(const Eigen::VectorXd &element, const int repeat, Eigen::VectorXi &indices, Eigen::VectorXd &combination)

Cartesian product of input element with itself. Number of repetition is specified with repeat argument. Inspired by https://docs.python.org/3/library/itertools.html#itertools.product.

Parameters:
  • element[in] Vector for which the cartesian product is needed.

  • repeat[in] Number of repetition

  • indices[in] Vector of indexes of which element will be repeated (will be changed during function call)

  • combination[out] Cartesian Product associated with the indices