Function::Polynomial Class Reference

#include <Function.h>

Inheritance diagram for Function::Polynomial:

Function

List of all members.


Detailed Description

template<int N>
class SimTK::Function< N >::Polynomial

This is a Function subclass whose output value is a polynomial of its argument: f(x) = ax^n+bx^(n-1)+.

..+c.

Public Member Functions

 Polynomial (const Vector_< Vec< N > > &coefficients)
 Create a Function::Polynomial object.
Vec< N > calcValue (const Vector &x) const
 Calculate the value of this function at a particular point.
Vec< N > calcDerivative (const std::vector< int > &derivComponents, const Vector &x) const
 Calculate a partial derivative of this function at a particular point.
virtual int getArgumentSize () const
 Get the number of components expected in the input vector.
int getMaxDerivativeOrder () const
 Get the maximum derivative order this Function object can calculate.


Constructor & Destructor Documentation

Polynomial ( const Vector_< Vec< N > > &  coefficients  )  [inline]

Create a Function::Polynomial object.

Parameters:
coefficients the polynomial coefficients in order of decreasing powers


Member Function Documentation

Vec<N> calcValue ( const Vector x  )  const [inline, virtual]

Calculate the value of this function at a particular point.

Parameters:
x the Vector of input arguments. Its size must equal the value returned by getArgumentSize().

Implements Function.

References fkinkryx::i, and VectorBase::size().

Vec<N> calcDerivative ( const std::vector< int > &  derivComponents,
const Vector x 
) const [inline, virtual]

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.

Parameters:
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 Function.

References fkinkryx::i, and VectorBase::size().

virtual int getArgumentSize (  )  const [inline, virtual]

Get the number of components expected in the input vector.

Implements Function.

int getMaxDerivativeOrder (  )  const [inline, virtual]

Get the maximum derivative order this Function object can calculate.

Implements Function.

References SimTK::max().


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

Generated on Fri Sep 26 07:44:31 2008 for SimTKcore by  doxygen 1.5.6