class adevs::InterPoly

This class implements Lagrange interpolating polynomials of arbitrary order for functions of a single variable.

Public Methods

[more] InterPoly(const double* u, const double* t, unsigned int n)
Construct a polynomial to interpolate a function u(t).
[more] 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
[more]void setData(const double* u, const double* t = NULL)
Assign new values to the data set.
[more]double interpolate(double t) const
Get the interpolated value at t
[more]double operator()(double t) const
Overloaded operator for the interpolate method
[more]double derivative(double t) const
Approximate the function derivative at t
[more] ~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.
o 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.

o 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

ovoid 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.

odouble interpolate(double t) const
Get the interpolated value at t

odouble operator()(double t) const
Overloaded operator for the interpolate method

odouble derivative(double t) const
Approximate the function derivative at t

o ~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++.