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 over the whole domain. More... | |
Real | integratePartial (Real x1, Real x2) const |
Returns the integral of the function over a specified domain. 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 257 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 269 of file LinearInterpolation.C.
Real LinearInterpolation::integrate | ( | ) |
This function returns the integral of the function over the whole domain.
Definition at line 123 of file LinearInterpolation.C.
Returns the integral of the function over a specified domain.
[in] | x1 | First point in integral domain |
[in] | x2 | Second point in integral domain |
Definition at line 133 of file LinearInterpolation.C.
Definition at line 263 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 89 of file LinearInterpolation.C.
|
inline |
|
private |
Definition at line 88 of file LinearInterpolation.h.
Referenced by integratePartial(), sample(), and sampleDerivative().
|
private |
Definition at line 85 of file LinearInterpolation.h.
Referenced by domain(), errorCheck(), getSampleSize(), integrate(), integratePartial(), sample(), sampleDerivative(), and setData().
|
private |
Definition at line 86 of file LinearInterpolation.h.
Referenced by errorCheck(), integrate(), integratePartial(), range(), sample(), sampleDerivative(), and setData().