#include <VectorGCVSplineR1R3.h>
Public Member Functions | |
VectorGCVSplineR1R3 () | |
Default constructor. | |
VectorGCVSplineR1R3 (int aDegree, int aN, const double *aTimes, double *aY0Values, double *aY1Values, double *aY2Values, const char *aName=NULL, double aErrorVariance=0.0) | |
Construct a spline of a specified degree given arrays of paired data points (x,f1(x),f2(x),f3(x)). | |
VectorGCVSplineR1R3 (const VectorGCVSplineR1R3 &aVectorSpline) | |
Copy constructor. | |
virtual | ~VectorGCVSplineR1R3 () |
Destructor. | |
virtual Object * | copy () const |
Copy this object. | |
VectorGCVSplineR1R3 & | operator= (const VectorGCVSplineR1R3 &aVectorSpline) |
Assignment operator. | |
void | setDegree (int aDegree) |
Set the degree of this spline. | |
GCVSpline * | getSplineY0 () const |
Get the individual splines in the vector. | |
GCVSpline * | getSplineY1 () const |
Get the individual splines in the vector. | |
GCVSpline * | getSplineY2 () const |
Get the individual splines in the vector. | |
void | setSplineY0 (GCVSpline *y0) |
void | setSplineY1 (GCVSpline *y1) |
void | setSplineY2 (GCVSpline *y2) |
virtual void | updateBoundingBox () |
Update the bounding box for this function. | |
virtual void | calcValue (const double *aX, double *rY, int aSize) |
Evaluate this function given a value for the independent variable. | |
virtual void | calcValue (const Array< double > &aX, Array< double > &rY) |
Evaluate this function given a value for the independent variable. | |
virtual void | calcDerivative (const Array< double > &aX, Array< double > &rY, const Array< int > &aDerivWRT) |
Evaluate this function or a derivative of this function given a value for the independent variable. | |
Protected Attributes | |
GCVSpline * | _splineY0 |
Spline containing 1st dependent variable data. | |
GCVSpline * | _splineY1 |
Spline containing 2nd dependent variable data. | |
GCVSpline * | _splineY2 |
Spline containing 3rd dependent variable data. |
VectorGCVSplineR1R3::VectorGCVSplineR1R3 | ( | ) |
Default constructor.
VectorGCVSplineR1R3::VectorGCVSplineR1R3 | ( | int | aDegree, | |
int | aN, | |||
const double * | aX, | |||
double * | aY0, | |||
double * | aY1, | |||
double * | aY2, | |||
const char * | aName = NULL , |
|||
double | aErrorVariance = 0.0 | |||
) |
Construct a spline of a specified degree given arrays of paired data points (x,f1(x),f2(x),f3(x)).
aDegree | Degree of the spline. Only the following degrees are supported: 1 = linear, 3 = cubic, 5 = qunitic, and 7 = heptic. | |
aN | of data points. | |
aX | Array of independent values- should be aN long. | |
aF | Array of function values- should be aN long and have 3 columns. | |
aName | Optional name of the spline. | |
aErrorVariance | Estimate of the variance of the error in the data to be fit. If negative, the variance will be estimated. If 0.0, the fit will try to fit the data points exactly- no smoothing. If positive, the fit will be smoothed according to the specified variance. The larger the error variance, the more the smoothing. The smoothing parameter, p, in Woltring (1986) is computed based on the error variance. |
VectorGCVSplineR1R3::VectorGCVSplineR1R3 | ( | const VectorGCVSplineR1R3 & | aVectorSpline | ) |
Copy constructor.
All data members of the specified spline are copied.
aSpline | VectorGCVSplineR1R3 object to be copied. |
VectorGCVSplineR1R3::~VectorGCVSplineR1R3 | ( | ) | [virtual] |
Destructor.
void VectorGCVSplineR1R3::calcDerivative | ( | const Array< double > & | aX, | |
Array< double > & | rY, | |||
const Array< int > & | aDerivWRT | |||
) | [virtual] |
Evaluate this function or a derivative of this function given a value for the independent variable.
aX | Vector of the independent variables. | |
rY | Vector of the resulting dependent variables. | |
aDerivWRT |
Implements OpenSim::VectorFunction.
Evaluate this function given a value for the independent variable.
aX | Vector of the independent variables. | |
rY | Vector of the resulting dependent variables. |
Implements OpenSim::VectorFunction.
void VectorGCVSplineR1R3::calcValue | ( | const double * | aX, | |
double * | rY, | |||
int | aSize | |||
) | [virtual] |
Evaluate this function given a value for the independent variable.
aX | Vector of the independent variables. | |
rY | Vector of the resulting dependent variables. |
Implements OpenSim::VectorFunction.
Object * VectorGCVSplineR1R3::copy | ( | ) | const [virtual] |
GCVSpline * VectorGCVSplineR1R3::getSplineY0 | ( | ) | const |
Get the individual splines in the vector.
GCVSpline * VectorGCVSplineR1R3::getSplineY1 | ( | ) | const |
Get the individual splines in the vector.
GCVSpline * VectorGCVSplineR1R3::getSplineY2 | ( | ) | const |
Get the individual splines in the vector.
VectorGCVSplineR1R3 & VectorGCVSplineR1R3::operator= | ( | const VectorGCVSplineR1R3 & | aVectorSpline | ) |
Assignment operator.
Note that data members of the base class are also assigned.
Reimplemented from OpenSim::VectorFunction.
void VectorGCVSplineR1R3::setDegree | ( | int | aDegree | ) |
Set the degree of this spline.
aDegree | Degree of spline. Legal values: 1 = linear, 3 = cubic, 5 = qunitic, 7 = heptic. |
void OpenSim::VectorGCVSplineR1R3::setSplineY0 | ( | GCVSpline * | y0 | ) | [inline] |
void OpenSim::VectorGCVSplineR1R3::setSplineY1 | ( | GCVSpline * | y1 | ) | [inline] |
void OpenSim::VectorGCVSplineR1R3::setSplineY2 | ( | GCVSpline * | y2 | ) | [inline] |
void VectorGCVSplineR1R3::updateBoundingBox | ( | ) | [virtual] |
Update the bounding box for this function.
For an GCVSpline, there is only one indepdendent variable x, so the minimum and maximum values of indepdent variables y and z is 0.0.
When this method is called, the minimum and maximum x of the bounding box is simply set to the minimum and maximum values of the x data points that were used to construct the spline, that is, min x = x[0] and max x = x[getN()-1].
Reimplemented from OpenSim::VectorFunction.
GCVSpline* OpenSim::VectorGCVSplineR1R3::_splineY0 [protected] |
Spline containing 1st dependent variable data.
GCVSpline* OpenSim::VectorGCVSplineR1R3::_splineY1 [protected] |
Spline containing 2nd dependent variable data.
GCVSpline* OpenSim::VectorGCVSplineR1R3::_splineY2 [protected] |
Spline containing 3rd dependent variable data.