This class interpolates values given a set of data pairs and an abscissa. More...
#include <LinearInterpolation.h>
Public Member Functions | |
LinearInterpolation (const std::vector< Real > &X, const std::vector< Real > &Y, const bool extrap=false) | |
LinearInterpolation () | |
virtual | ~LinearInterpolation ()=default |
void | setData (const std::vector< Real > &X, const std::vector< Real > &Y) |
Set the x and y values. More... | |
void | errorCheck () |
template<typename T > | |
T | sample (const T &x) const |
This function will take an independent variable input and will return the dependent variable based on the generated fit. More... | |
template<typename T > | |
T | sampleDerivative (const T &x) const |
This function will take an independent variable input and will return the derivative of the dependent variable with respect to the independent variable based on the generated fit. More... | |
unsigned int | getSampleSize () const |
This function returns the size of the array holding the points, i.e. More... | |
Real | integrate () |
This function returns the integral of the function. More... | |
Real | domain (int i) const |
Real | range (int i) const |
Private Attributes | |
std::vector< Real > | _x |
std::vector< Real > | _y |
bool | _extrap |
This class interpolates values given a set of data pairs and an abscissa.
Definition at line 21 of file LinearInterpolation.h.
LinearInterpolation::LinearInterpolation | ( | const std::vector< Real > & | X, |
const std::vector< Real > & | Y, | ||
const bool | extrap = false |
||
) |
Definition at line 19 of file LinearInterpolation.C.
|
inline |
Definition at line 31 of file LinearInterpolation.h.
|
virtualdefault |
Definition at line 127 of file LinearInterpolation.C.
void LinearInterpolation::errorCheck | ( | ) |
Definition at line 28 of file LinearInterpolation.C.
Referenced by LinearInterpolation(), and setData().
unsigned int LinearInterpolation::getSampleSize | ( | ) | const |
This function returns the size of the array holding the points, i.e.
the number of sample points
Definition at line 139 of file LinearInterpolation.C.
Real LinearInterpolation::integrate | ( | ) |
This function returns the integral of the function.
Definition at line 117 of file LinearInterpolation.C.
Definition at line 133 of file LinearInterpolation.C.
template ChainedReal LinearInterpolation::sample< ChainedReal > | ( | const T & | x | ) | const |
This function will take an independent variable input and will return the dependent variable based on the generated fit.
Definition at line 45 of file LinearInterpolation.C.
Referenced by IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeInitialDT(), and IterationAdaptiveDT::computeInterpolationDT().
template ChainedReal LinearInterpolation::sampleDerivative< ChainedReal > | ( | const T & | x | ) | const |
This function will take an independent variable input and will return the derivative of the dependent variable with respect to the independent variable based on the generated fit.
Definition at line 86 of file LinearInterpolation.C.
|
inline |
|
private |
Definition at line 80 of file LinearInterpolation.h.
Referenced by sample(), and sampleDerivative().
|
private |
Definition at line 77 of file LinearInterpolation.h.
Referenced by domain(), errorCheck(), getSampleSize(), integrate(), sample(), sampleDerivative(), and setData().
|
private |
Definition at line 78 of file LinearInterpolation.h.
Referenced by errorCheck(), integrate(), range(), sample(), sampleDerivative(), and setData().