Function Karana::Dynamics::Algorithms::evalVelCoordinatePartitioning

Function Karana::Dynamics::Algorithms::evalVelCoordinatePartitioning#

Function Documentation#

std::pair<km::VecInt, km::Mat> Karana::Dynamics::Algorithms::evalVelCoordinatePartitioning(SubGraph &sg, const km::VecInt &available_indices = {})#

Compute the best indices for independent and dependent velocity coordinates matrix map.

For a SubGraph with constraints, only a subset of the velocity coordinates are independent. This method computes the indices of the coordinates in the U vector that are best choice for independent velocity coordinates (at the current configuration). It also returns a matrix X that can be used to compute the dependent velocity coordinates, U_d, for a set of independent velocity coordinates, U_i, via U_d = X * U_i,

See the Constraints Related Algorithms section for more information.

Parameters:
  • sg – SubGraph instance

  • available_indices – the list of indices to pick the independent ones from

Returns:

The list of independent coordinate indices and the dependent coordinate mapping matrix