27 #ifndef SCIMATH_INTERPOLATE1D_H
28 #define SCIMATH_INTERPOLATE1D_H
30 #include <casacore/casa/aips.h>
31 #include <casacore/scimath/Functionals/Function1D.h>
32 #include <casacore/casa/Containers/Block.h>
36 template<
class Range>
class SampledFunctional;
226 #ifndef CASACORE_NO_AUTO_TEMPLATES
227 #include <casacore/scimath/Functionals/Interpolate1D.tcc>
Range polynomialInterpolation(const Domain x, uInt n, uInt offset) const
A private function for doing polynomial interpolation.
void setData(const SampledFunctional< Domain > &x, const SampledFunctional< Range > &y, const Bool sorted=False, const Bool uniq=False)
Define a new data set for the class to operate on.
Interpolate1D(const SampledFunctional< Domain > &x, const SampledFunctional< Range > &y, const Bool sorted=False, const Bool uniq=False)
Construct an object with the specified data.
Method
The different interpolation methods are enumerated here.
@ nearestNeighbour
Crude but sometimes useful.
@ linear
The most common method and the Default.
@ cubic
Fits a third order polynomial to 4 pts
@ spline
Natural Cubic Splines.
Interpolate1D(const Interpolate1D< Domain, Range > &other)
The standard copy constructor, assignment operator and destructor.
virtual const String & name() const
Name of function.
virtual Function< Domain, Range > * clone() const
A function to copy the Interpolate1D object.
uInt getMethod() const
inquire/set the current interpolation method.
Interpolate1D()
The default constructor generates a useless object until the setData function has been called.
Interpolate1D< Domain, Range > & operator=(const Interpolate1D< Domain, Range > &other)
void setMethod(uInt method)
Vector< Range > getY() const
Vector< Domain > getX() const
Access the data set that interpolation is done over.
virtual Range eval(typename Function1D< Domain, Range >::FunctionArg x) const
Interpolation is done using the () operator (see example above).
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.