This class implements Lagrange interpolating polynomials of arbitrary order for functions of a single variable.
Public Methods
-
InterPoly(const double* u, const double* t, unsigned int n)
- Construct a polynomial to interpolate a function u(t).
-
InterPoly(const double* u, double dt, unsigned int n, double t0 = 0.0)
- Construct a polynomial to interpolate u(t) with data points that are regularly spaced in time from an offset t0
-
void setData(const double* u, const double* t = NULL)
- Assign new values to the data set.
-
double interpolate(double t) const
- Get the interpolated value at t
-
double operator()(double t) const
- Overloaded operator for the interpolate method
-
double derivative(double t) const
- Approximate the function derivative at t
-
~InterPoly()
- Destructor
Documentation
This class implements Lagrange interpolating
polynomials of arbitrary order for functions of
a single variable. This can be
useful in many discrete event simulations where
tabular values, possible produced by discrete time
calculations, need to be interpolated for use
in a discrete event system. GDEVS is one particular
example of this.
InterPoly(const double* u, const double* t, unsigned int n)
-
Construct a polynomial to interpolate
a function u(t). The u- values
are the depedent variable and t- the independent
variables.
InterPoly(const double* u, double dt, unsigned int n, double t0 = 0.0)
-
Construct a polynomial to interpolate u(t) with data points
that are regularly spaced in time from an offset t0
void setData(const double* u, const double* t = NULL)
-
Assign new values to the data set. If t is NULL, then
only new u values will be assigned and the old t data is
kept.
double interpolate(double t) const
-
Get the interpolated value at t
double operator()(double t) const
-
Overloaded operator for the interpolate method
double derivative(double t) const
-
Approximate the function derivative at t
~InterPoly()
-
Destructor
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.