A class for representing a LinearFunction. More...
#include <LinearFunction.h>
Public Member Functions | |
LinearFunction () | |
Default constructor. | |
LinearFunction (Array< double > coefficients) | |
LinearFunction (const LinearFunction &aSpline) | |
Copy constructor. | |
virtual | ~LinearFunction () |
Destructor. | |
virtual Object * | copy () const |
Copy this object. | |
LinearFunction & | operator= (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 |
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.
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.
aLinearFunction | LinearFunction object to be copied. |
LinearFunction::~LinearFunction | ( | ) | [virtual] |
Destructor.
Object * LinearFunction::copy | ( | ) | const [virtual] |
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.
aLinearFunction | LinearFunction to be copied. |
Reimplemented from OpenSim::Function.
void LinearFunction::setCoefficients | ( | Array< double > | coefficients | ) |
Set Coefficients for slope and intercept.
Array<double>& OpenSim::LinearFunction::_coefficients [protected] |