Rigid Body Dynamics Library
|
#include <Function.h>
Public Member Functions | |
Polynomial (const RigidBodyDynamics::Math::VectorNd &coefficients) | |
T | calcValue (const RigidBodyDynamics::Math::VectorNd &x) const |
T | calcDerivative (const std::vector< int > &derivComponents, const RigidBodyDynamics::Math::VectorNd &x) const |
virtual int | getArgumentSize () const |
int | getMaxDerivativeOrder () const |
Public Member Functions inherited from Function_< T > | |
virtual | ~Function_ () |
virtual T | calcValue (const RigidBodyDynamics::Math::VectorNd &x) const =0 |
virtual T | calcDerivative (const std::vector< int > &derivComponents, const RigidBodyDynamics::Math::VectorNd &x) const =0 |
virtual int | getArgumentSize () const =0 |
virtual int | getMaxDerivativeOrder () const =0 |
Private Attributes | |
const RigidBodyDynamics::Math::VectorNd | coefficients |
This is a Function_ subclass whose output value is a polynomial of its argument: f(x) = ax^n+bx^(n-1)+...+c.
Definition at line 239 of file Function.h.
|
inline |
Create a Function_::Polynomial object.
coefficients | the polynomial coefficients in order of decreasing powers |
Definition at line 247 of file Function.h.
|
inlinevirtual |
Calculate a partial derivative of this function at a particular point.
Which derivative to take is specified by listing the input components with which to take it. For example, if derivComponents=={0}, that indicates a first derivative with respective to component 0. If derivComponents=={0, 0, 0}, that indicates a third derivative with respective to component 0. If derivComponents=={4, 7}, that indicates a partial second derivative with respect to components 4 and 7.
derivComponents | The input components with respect to which the derivative should be taken. Its size must be less than or equal to the value returned by getMaxDerivativeOrder(). |
x | The RigidBodyDynamics::Math::VectorNd of input arguments. Its size must equal the value returned by getArgumentSize(). |
Implements Function_< T >.
Definition at line 258 of file Function.h.
References MX_Xd_dynamic::size().
|
inlinevirtual |
Calculate the value of this function at a particular point.
x | the RigidBodyDynamics::Math::VectorNd of input arguments. Its size must equal the value returned by getArgumentSize(). |
Implements Function_< T >.
Definition at line 250 of file Function.h.
References MX_Xd_dynamic::size().
|
inlinevirtual |
This provides compatibility with std::vector without requiring any copying. Get the number of components expected in the input vector.
Implements Function_< T >.
Definition at line 274 of file Function.h.
|
inlinevirtual |
Get the maximum derivative order this Function_ object can calculate.
Implements Function_< T >.
Definition at line 277 of file Function.h.
|
private |
This provides compatibility with std::vector without requiring any copying.
Definition at line 289 of file Function.h.