OpenSim::Function Class Reference

#include <Function.h>

Inheritance diagram for OpenSim::Function:
OpenSim::Object MultidimensionalFunction MultidimensionalFunction OpenSim::BSpline OpenSim::Constant OpenSim::GCVSpline OpenSim::LinearFunction OpenSim::MultiplierFunction OpenSim::NaturalCubicSpline OpenSim::PiecewiseLinearFunction OpenSim::StepFunction

List of all members.

Public Member Functions

 Function ()
 Default constructor.
 Function (const Function &aFunction)
 Copy constructor.
virtual ~Function ()
 Destructor.
virtual Objectcopy () const =0
 Construct and return a copy of this object.
virtual void init (Function *aFunction)
Functionoperator= (const Function &aFunction)
 Assignment operator.
virtual double calcValue (const SimTK::Vector &x) const
 Calculate the value of this function at a particular point.
virtual double calcDerivative (const std::vector< int > &derivComponents, const SimTK::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.
virtual int getMaxDerivativeOrder () const
 Get the maximum derivative order this Function object can calculate.
virtual SimTK::Function * createSimTKFunction () const =0
 OPENSIM_DECLARE_DERIVED (Function, Object)

Static Public Member Functions

static FunctionmakeFunctionOfType (Function *aFunction, const std::string &aNewTypeName)

Protected Member Functions

void resetFunction ()
 This should be called whenever this object has been modified.

Protected Attributes

SimTK::Function * _function

Constructor & Destructor Documentation

Function::Function (  ) 

Default constructor.

Function::Function ( const Function aFunction  ) 

Copy constructor.

Parameters:
aFunction Function to copy.
Function::~Function (  )  [virtual]

Destructor.


Member Function Documentation

virtual double OpenSim::Function::calcDerivative ( const std::vector< int > &  derivComponents,
const SimTK::Vector &  x 
) const [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().

Reimplemented in OpenSim::MultiplierFunction, OpenSim::NaturalCubicSpline, OpenSim::PiecewiseLinearFunction, OpenSim::StepFunction, MultidimensionalFunction, and MultidimensionalFunction.

virtual double OpenSim::Function::calcValue ( const SimTK::Vector &  x  )  const [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().

Reimplemented in OpenSim::Constant, OpenSim::MultiplierFunction, OpenSim::NaturalCubicSpline, OpenSim::PiecewiseLinearFunction, OpenSim::StepFunction, MultidimensionalFunction, and MultidimensionalFunction.

virtual Object* OpenSim::Function::copy (  )  const [pure virtual]

Construct and return a copy of this object.

The object is allocated using the new operator, so the caller is responsible for deleting the returned object.

Returns:
Copy of this object.

Reimplemented from OpenSim::Object.

Implemented in OpenSim::Constant, OpenSim::GCVSpline, OpenSim::LinearFunction, OpenSim::MultiplierFunction, OpenSim::NaturalCubicSpline, OpenSim::PiecewiseLinearFunction, OpenSim::StepFunction, MultidimensionalFunction, and MultidimensionalFunction.

virtual SimTK::Function* OpenSim::Function::createSimTKFunction (  )  const [pure virtual]
int Function::getArgumentSize (  )  const [virtual]
int Function::getMaxDerivativeOrder (  )  const [virtual]
virtual void OpenSim::Function::init ( Function aFunction  )  [inline, virtual]
static Function* OpenSim::Function::makeFunctionOfType ( Function aFunction,
const std::string &  aNewTypeName 
) [static]
OpenSim::Function::OPENSIM_DECLARE_DERIVED ( Function  ,
Object   
)
Function & Function::operator= ( const Function aFunction  ) 
void Function::resetFunction (  )  [protected]

This should be called whenever this object has been modified.

It clears the internal SimTK::Function object used to evaluate it.


Member Data Documentation

SimTK::Function* OpenSim::Function::_function [mutable, protected]

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

Generated on Wed Dec 16 15:03:40 2009 for OpenSim by  doxygen 1.6.1