Go to the documentation of this file. 1 #ifndef SimTK_SIMMATH_SPLINE_FITTER_H_
2 #define SimTK_SIMMATH_SPLINE_FITTER_H_
98 degree, 2, 0, coeff, wk, ier);
100 (degree,
Spline_<T>(degree, x, coeff), wk[3], wk[4], wk[2]));
117 degree, 3, error, coeff, wk, ier);
119 (degree,
Spline_<T>(degree, x, coeff), wk[3], wk[4], wk[2]));
136 degree, 4, dof, coeff, wk, ier);
138 (degree,
Spline_<T>(degree, x, coeff), wk[3], wk[4], wk[2]));
155 degree, 1, p, coeff, wk, ier);
157 (degree,
Spline_<T>(degree, x, coeff), wk[3], wk[4], wk[2]));
184 class SplineFitterImpl;
187 SplineFitterImpl* impl;
196 assert(referenceCount == 0);
206 #endif // SimTK_SIMMATH_SPLINE_FITTER_H_
static SplineFitter fitFromDOF(int degree, const Vector &x, const Vector_< T > &y, Real dof)
Perform a fit, choosing a value of the smoothing parameter based on the expect number of degrees of f...
Definition: SplineFitter.h:131
const Spline_< T > & getSpline()
Get the Spline_ that was generated by the fitting.
Definition: SplineFitter.h:162
Real getSmoothingParameter()
Get the smoothing parameter that was used for the fitting.
Definition: SplineFitter.h:168
This is a System that represents the dynamics of a particle moving along a smooth surface.
Definition: Assembler.h:37
This class implements a non-uniform Bezier curve.
Definition: Spline.h:52
SplineFitter(const SplineFitter ©)
Definition: SplineFitter.h:71
~SplineFitterImpl()
Definition: SplineFitter.h:195
SplineFitter operator=(const SplineFitter ©)
Definition: SplineFitter.h:74
SplineFitterImpl(int degree, const Spline_< T > &spline, Real p, Real error, Real dof)
Definition: SplineFitter.h:193
static SplineFitter fitFromGCV(int degree, const Vector &x, const Vector_< T > &y)
Perform a fit, choosing a value of the smoothing parameter that minimizes the Generalized Cross Valid...
Definition: SplineFitter.h:93
static SplineFitter fitForSmoothingParameter(int degree, const Vector &x, const Vector_< T > &y, Real p)
Perform a fit, using a specified fixed value for the smoothing parameter.
Definition: SplineFitter.h:150
Real getDegreesOfFreedom()
Get the estimate of the number of degrees of freedom of the residual that was determined by the fitti...
Definition: SplineFitter.h:180
int degree
Definition: SplineFitter.h:199
int referenceCount
Definition: SplineFitter.h:198
Given a set of data points, this class creates a Spline_ which interpolates or approximates them.
Definition: SplineFitter.h:69
static SplineFitter fitFromErrorVariance(int degree, const Vector &x, const Vector_< T > &y, Real error)
Perform a fit, choosing a value of the smoothing parameter based on the known error variance in the d...
Definition: SplineFitter.h:112
Vector_< Real > Vector
Variable-size column vector of Real elements; abbreviation for Vector_<Real>.
Definition: BigMatrix.h:1473
Real getMeanSquaredError()
Get the estimate of the true mean squared error in the data that was determined by the fitting.
Definition: SplineFitter.h:174
SimTK_Real Real
This is the default compiled-in floating point type for SimTK, either float or double.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:606
void copy(Row< 1, E1, S1 > &r1, const Row< 1, E2, S2 > &r2)
Definition: Row.h:105
Spline_< T > spline
Definition: SplineFitter.h:200
Real error
Definition: SplineFitter.h:201
Definition: SplineFitter.h:191
~SplineFitter()
Definition: SplineFitter.h:79
Real dof
Definition: SplineFitter.h:201
static void gcvspl(const Vector &x, const Vector &y, const Vector &wx, Real wy, int m, int md, Real val, Vector &c, Vector &wk, int &ier)
Real p
Definition: SplineFitter.h:201