OpenSim::LinearFunction Class Reference

A class for representing a LinearFunction. More...

#include <LinearFunction.h>

Inheritance diagram for OpenSim::LinearFunction:
OpenSim::Function OpenSim::Object

List of all members.

Public Member Functions

 LinearFunction ()
 Default constructor.
 LinearFunction (Array< double > coefficients)
 LinearFunction (const LinearFunction &aSpline)
 Copy constructor.
virtual ~LinearFunction ()
 Destructor.
virtual Objectcopy () const
 Copy this object.
LinearFunctionoperator= (const LinearFunction &aLinearFunction)
 Assignment operator.
void setCoefficients (Array< double > coefficients)
 Set Coefficients for slope and intercept.
const Array< double > getCoefficients () const
 Get Coefficients.
virtual SimTK::Function * createSimTKFunction () const
 OPENSIM_DECLARE_DERIVED (LinearFunction, Function)

Protected Attributes

PropertyDblArray _coefficientsProp
Array< double > & _coefficients

Detailed Description

A class for representing a LinearFunction.

dependent = slope*independent + intercept

This class inherits from Function and so can be used as input to any class requiring a Fuction as input.

Author:
Ajay Seth
Version:
1.0

Constructor & Destructor Documentation

LinearFunction::LinearFunction (  ) 

Default constructor.

LinearFunction::LinearFunction ( Array< double >  coefficients  ) 
LinearFunction::LinearFunction ( const LinearFunction aLinearFunction  ) 

Copy constructor.

All data members of the specified LinearFunction are copied.

Parameters:
aLinearFunction LinearFunction object to be copied.
LinearFunction::~LinearFunction (  )  [virtual]

Destructor.


Member Function Documentation

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

Copy this object.

Returns:
Pointer to a copy of this object.

Implements OpenSim::Function.

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

Implements OpenSim::Function.

const Array<double> OpenSim::LinearFunction::getCoefficients (  )  const [inline]

Get Coefficients.

OpenSim::LinearFunction::OPENSIM_DECLARE_DERIVED ( LinearFunction  ,
Function   
)
LinearFunction & LinearFunction::operator= ( const LinearFunction aLinearFunction  ) 

Assignment operator.

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

Parameters:
aLinearFunction LinearFunction to be copied.
Returns:
Reference to this object.

Reimplemented from OpenSim::Function.

void LinearFunction::setCoefficients ( Array< double >  coefficients  ) 

Set Coefficients for slope and intercept.


Member Data Documentation


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