OpenSim::MultiplierFunction Class Reference

#include <MultiplierFunction.h>

Inheritance diagram for OpenSim::MultiplierFunction:
OpenSim::Function OpenSim::Object

List of all members.

Public Member Functions

 MultiplierFunction ()
 Default constructor.
 MultiplierFunction (Function *aFunction)
 MultiplierFunction (Function *aFunction, double aScaleFactor)
 MultiplierFunction (const MultiplierFunction &aFunction)
 Copy constructor.
virtual ~MultiplierFunction ()
 Destructor.
virtual Objectcopy () const
 Copy this object.
virtual void init (Function *aFunction)
MultiplierFunctionoperator= (const MultiplierFunction &aFunction)
 Assignment operator.
void setFunction (Function *aFunction)
void setScale (double aScaleFactor)
FunctiongetFunction () const
double getScale () const
double calcValue (const SimTK::Vector &x) const
 Calculate the value of this function at a particular point.
double calcDerivative (const std::vector< int > &derivComponents, const SimTK::Vector &x) const
 Calculate a partial derivative of this function at a particular point.
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.
SimTK::Function * createSimTKFunction () const
virtual void updateFromXMLNode ()
 Update this object based on its XML node.

Protected Attributes

PropertyObjPtr< OpenSim::Function_osFunctionProp
 The Function this object operates on.
Function *& _osFunction
PropertyDbl _scaleProp
 Scale factor.
double & _scale

Constructor & Destructor Documentation

MultiplierFunction::MultiplierFunction (  ) 

Default constructor.

MultiplierFunction::MultiplierFunction ( Function aFunction  ) 
MultiplierFunction::MultiplierFunction ( Function aFunction,
double  aScaleFactor 
)
MultiplierFunction::MultiplierFunction ( const MultiplierFunction aFunction  ) 

Copy constructor.

All data members of the specified function are copied.

Parameters:
aFunction MultiplierFunction object to be copied.
MultiplierFunction::~MultiplierFunction (  )  [virtual]

Destructor.


Member Function Documentation

double OpenSim::MultiplierFunction::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 from OpenSim::Function.

double MultiplierFunction::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 from OpenSim::Function.

Object * MultiplierFunction::copy (  )  const [virtual]

Copy this object.

Returns:
Pointer to a copy of this object.

Implements OpenSim::Function.

SimTK::Function * MultiplierFunction::createSimTKFunction (  )  const [virtual]

Implements OpenSim::Function.

int MultiplierFunction::getArgumentSize (  )  const [virtual]

Get the number of components expected in the input vector.

Reimplemented from OpenSim::Function.

Function* OpenSim::MultiplierFunction::getFunction (  )  const [inline]
int MultiplierFunction::getMaxDerivativeOrder (  )  const [virtual]

Get the maximum derivative order this Function object can calculate.

Reimplemented from OpenSim::Function.

double OpenSim::MultiplierFunction::getScale (  )  const [inline]
void MultiplierFunction::init ( Function aFunction  )  [virtual]
MultiplierFunction & MultiplierFunction::operator= ( const MultiplierFunction aFunction  ) 

Assignment operator.

Note that data members of the base class are also assigned.

Returns:
Reference to this object.

Reimplemented from OpenSim::Function.

void MultiplierFunction::setFunction ( Function aFunction  ) 
void MultiplierFunction::setScale ( double  aScaleFactor  ) 
void MultiplierFunction::updateFromXMLNode (  )  [virtual]

Update this object based on its XML node.

Reimplemented from OpenSim::Object.


Member Data Documentation

The Function this object operates on.

Scale factor.


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

Generated on Sun Sep 25 00:19:49 2011 for OpenSim by  doxygen 1.6.1