Monotonicity-preserving interpolation. More...
#include <interp.h>
This class uses a method based on cubic Hermite interpolation, modifying the slopes to guarantee monotonicity. In the notation of Fritsch80, if
then and
are decreased by the factor
as described at the end of section 4.
Based on Fritsch80 .
Public Types | |
typedef boost::numeric::ublas::vector< double > | ubvector |
Public Member Functions | |
virtual void | set (size_t size, const vec_t &x, const vec2_t &y) |
Initialize interpolation routine. | |
virtual double | eval (double x0) const |
Give the value of the function ![]() | |
virtual double | deriv (double x0) const |
Give the value of the derivative ![]() | |
virtual double | deriv2 (double x0) const |
Give the value of the second derivative ![]() | |
virtual double | integ (double a, double b) const |
Give the value of the integral ![]() | |
virtual const char * | type () const |
Return the type, "interp_monotonic" . | |
![]() | |
virtual void | set (size_t size, const vec_t &x, const vec_t &y)=0 |
Initialize interpolation routine. | |
virtual double | operator() (double x0) const |
Give the value of the function ![]() | |
virtual const char * | type () const=0 |
Return the type. | |
Protected Attributes | |
ubvector | m |
Slopes. | |
ubvector | Delta |
Finite differences. | |
ubvector | alpha |
Ratio. | |
ubvector | beta |
Staggered ratio. | |
![]() | |
search_vec< const vec_t > | svx |
To perform binary searches. More... | |
const vec_t * | px |
Independent vector. | |
const vec_t * | py |
Dependent vector. | |
size_t | sz |
Vector size. | |
Private Member Functions | |
interp_monotonic (const interp_monotonic< vec_t, vec2_t > &) | |
interp_monotonic< vec_t, vec2_t > & | operator= (const interp_monotonic< vec_t, vec2_t > &) |
Additional Inherited Members | |
![]() | |
size_t | min_size |
The minimum size of the vectors to interpolate between. More... | |
![]() | |
double | integ_eval (double ai, double bi, double ci, double di, double xi, double a, double b) const |
An internal function to assist in computing the integral for both the cspline and Akima types. | |
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).