|
Simbody
3.8
|
This is a Function_ subclass which simply returns a fixed value, independent of its arguments. More...
Inheritance diagram for SimTK::Function_< T >::Constant:Public Member Functions | |
| Constant (T value, int argumentSize=1) | |
| Create a Function_::Constant object. More... | |
| T | calcValue (const Vector &x) const override |
| Calculate the value of this function at a particular point. More... | |
| T | calcDerivative (const Array_< int > &derivComponents, const Vector &x) const override |
| Calculate a partial derivative of this function at a particular point. More... | |
| int | getArgumentSize () const override |
| Get the number of components expected in the input vector. More... | |
| int | getMaxDerivativeOrder () const override |
| Get the maximum derivative order this Function_ object can calculate. More... | |
| Constant * | clone () const override |
| Create a new heap-allocated copy of this concrete Function. More... | |
| T | calcDerivative (const std::vector< int > &derivComponents, const Vector &x) const |
| This provides compatibility with std::vector without requiring any copying. More... | |
Public Member Functions inherited from SimTK::Function_< T > | |
| virtual | ~Function_ () |
| T | calcDerivative (const std::vector< int > &derivComponents, const Vector &x) const |
| This provides compatibility with std::vector without requiring any copying. More... | |
This is a Function_ subclass which simply returns a fixed value, independent of its arguments.
|
inlineexplicit |
Create a Function_::Constant object.
| value | the value which should be returned by calcValue(); |
| argumentSize | the value which should be returned by getArgumentSize(), with a default of 1. |
|
inlineoverridevirtual |
Calculate the value of this function at a particular point.
| x | the Vector of input arguments. Its size must equal the value returned by getArgumentSize(). |
Implements SimTK::Function_< T >.
|
inlineoverridevirtual |
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 Vector of input arguments. Its size must equal the value returned by getArgumentSize(). |
Implements SimTK::Function_< T >.
|
inlineoverridevirtual |
Get the number of components expected in the input vector.
Implements SimTK::Function_< T >.
|
inlineoverridevirtual |
Get the maximum derivative order this Function_ object can calculate.
Implements SimTK::Function_< T >.
|
inlineoverridevirtual |
Create a new heap-allocated copy of this concrete Function.
For backwards compatibility this is not pure virtual; it has a default implementation that throws an exception if called. However, it should always be implemented.
Reimplemented from SimTK::Function_< T >.
|
inline |
This provides compatibility with std::vector without requiring any copying.