Implements a linearly interpolated scalar function that depends on one variable.
More...
|
| Tabulated1DFunction () |
| Default constructor for a piecewise linear function. More...
|
|
template<class ScalarArrayX , class ScalarArrayY > |
| Tabulated1DFunction (size_t nSamples, const ScalarArrayX &x, const ScalarArrayY &y, bool sortInputs=true) |
| Convenience constructor for a piecewise linear function. More...
|
|
template<class ScalarContainer > |
| Tabulated1DFunction (const ScalarContainer &x, const ScalarContainer &y, bool sortInputs=true) |
| Convenience constructor for a piecewise linear function. More...
|
|
template<class PointContainer > |
| Tabulated1DFunction (const PointContainer &points, bool sortInputs=true) |
| Convenience constructor for a piecewise linear function. More...
|
|
template<class ScalarArrayX , class ScalarArrayY > |
void | setXYArrays (size_t nSamples, const ScalarArrayX &x, const ScalarArrayY &y, bool sortInputs=true) |
| Set the sampling points for the piecewise linear function. More...
|
|
template<class ScalarContainerX , class ScalarContainerY > |
void | setXYContainers (const ScalarContainerX &x, const ScalarContainerY &y, bool sortInputs=true) |
| Set the sampling points for the piecewise linear function. More...
|
|
template<class PointArray > |
void | setArrayOfPoints (size_t nSamples, const PointArray &points, bool sortInputs=true) |
| Set the sampling points for the piecewise linear function.
|
|
template<class XYContainer > |
void | setContainerOfTuples (const XYContainer &points, bool sortInputs=true) |
| Set the sampling points of the piecewise linear function using a STL-compatible container of tuple-like objects. More...
|
|
size_t | numSamples () const |
| Returns the number of sampling points.
|
|
Scalar | xMin () const |
| Return the x value of the leftmost sampling point.
|
|
Scalar | xMax () const |
| Return the x value of the rightmost sampling point.
|
|
Scalar | xAt (size_t i) const |
| Return the x value of the a sample point with a given index.
|
|
const std::vector< Scalar > & | xValues () const |
|
const std::vector< Scalar > & | yValues () const |
|
Scalar | valueAt (size_t i) const |
| Return the value of the a sample point with a given index.
|
|
template<class Evaluation > |
bool | applies (const Evaluation &x) const |
| Return true iff the given x is in range [x1, xn].
|
|
template<class Evaluation > |
Evaluation | eval (const Evaluation &x, bool extrapolate=false) const |
| Evaluate the spline at a given position. More...
|
|
template<class Evaluation > |
Evaluation | eval (const Evaluation &x, SegmentIndex segIdxIn) const |
|
template<class Evaluation > |
Evaluation | evalDerivative (const Evaluation &x, bool extrapolate=false) const |
| Evaluate the spline's derivative at a given position. More...
|
|
template<class Evaluation > |
Evaluation | evalSecondDerivative (const Evaluation &, bool=false) const |
| Evaluate the function's second derivative at a given position. More...
|
|
template<class Evaluation > |
Evaluation | evalThirdDerivative (const Evaluation &, bool=false) const |
| Evaluate the function's third derivative at a given position. More...
|
|
int | monotonic (Scalar x0, Scalar x1, bool extrapolate=false) const |
| Returns 1 if the function is monotonically increasing, -1 if the function is mononously decreasing and 0 if the function is not monotonous in the interval (x0, x1). More...
|
|
int | monotonic () const |
| Same as monotonic(x0, x1), but with the entire range of the function as interval.
|
|
void | printCSV (Scalar xi0, Scalar xi1, unsigned k, std::ostream &os) const |
| Prints k tuples of the format (x, y, dx/dy, isMonotonic) to stdout. More...
|
|
bool | operator== (const Tabulated1DFunction< Scalar > &data) const |
|
template<class Evaluation > |
SegmentIndex | findSegmentIndex (const Evaluation &x, bool extrapolate=false) const |
|
template<class Scalar>
class Opm::Tabulated1DFunction< Scalar >
Implements a linearly interpolated scalar function that depends on one variable.