OpenSim Moco  0.4.0
Public Member Functions | List of all members
OpenSim::SimTKMultivariatePolynomial< T > Class Template Reference
Inheritance diagram for OpenSim::SimTKMultivariatePolynomial< T >:

Public Member Functions

 SimTKMultivariatePolynomial (const SimTK::Vector_< T > &coefficients, const int &dimension, const int &order)
 Create a SimTKMultivariatePolynomial object. More...
 
calcValue (const SimTK::Vector &x) const override
 
calcDerivative (const SimTK::Array_< int > &derivComponent, const SimTK::Vector &x) const override
 
int getArgumentSize () const override
 
int getMaxDerivativeOrder () const override
 
SimTKMultivariatePolynomialclone () const override
 
calcDerivative (const std::vector< int > &derivComponent, const SimTK::Vector &x) const
 

Constructor & Destructor Documentation

◆ SimTKMultivariatePolynomial()

template<class T >
OpenSim::SimTKMultivariatePolynomial< T >::SimTKMultivariatePolynomial ( const SimTK::Vector_< T > &  coefficients,
const int &  dimension,
const int &  order 
)
inline

Create a SimTKMultivariatePolynomial object.

This implementation assumes a maximum of four dimensions and allows computation of order one derivatives only.

Parameters
coefficientsthe polynomial coefficients in order of ascending powers starting from the last dependent component. For a polynomial of third order dependent on three components (X, Y, Z), the order is a follows:
Index | X  Y  Z
0     | 0  0  0
1     | 0  0  1
2     | 0  0  2
3     | 0  0  3
4     | 0  1  0
5     | 0  1  1
6     | 0  1  2
7     | 0  2  0
8     | 0  2  1
9     | 0  3  0
10    | 1  0  0
11    | 1  0  1
12    | 1  0  2
13    | 1  1  0
14    | 1  1  1
15    | 1  2  0
16    | 2  0  0
17    | 2  0  1
18    | 2  1  0
19    | 3  0  0
Assuming c6 the index 6 coefficient, the corresponding term is Y Z^2.
dimensionthe number of dependent components
orderthe polynomial order

The documentation for this class was generated from the following file: