This class uses linear interpolation to compute the value (and its derivative) of a function f sampled at uniform points.
More...
#include <UniformTableLinear.hpp>
|
enum | RangePolicy { Throw = 0,
ClosestValue = 1,
Extrapolate = 2
} |
| Policies for how to behave when trying to evaluate outside the domain.
|
|
|
template<typename U > |
std::ostream & | operator<< (std::ostream &os, const UniformTableLinear< U > &t) |
|
template<typename T>
class Opm::UniformTableLinear< T >
This class uses linear interpolation to compute the value (and its derivative) of a function f sampled at uniform points.
- Template Parameters
-
T | the range type of the function (should be an algebraic ring type) |
◆ UniformTableLinear() [1/2]
Construct from vector of y-values.
- Parameters
-
xmin | the x value corresponding to the first y value. |
xmax | the x value corresponding to the last y value. |
y_values | vector of range values. |
◆ UniformTableLinear() [2/2]
Construct from array of y-values.
- Parameters
-
xmin | the x value corresponding to the first y value. |
xmax | the x value corresponding to the last y value. |
y_values | array of range values. |
num_y_values | the number of values in y_values. |
◆ derivative()
Evaluate the derivative at x.
- Parameters
-
- Returns
- f'(x)
◆ domain()
Get the domain.
- Returns
- the domain as a pair of doubles.
◆ operator()()
Evaluate the value at x.
- Parameters
-
- Returns
- f(x)
◆ operator==()
Equality operator.
- Parameters
-
- Returns
- true if they are represented exactly alike.
◆ rescaleDomain()
Rescale the domain.
- Parameters
-
new_domain | the new domain as a pair of doubles. |
◆ setLeftPolicy()
Sets the behavioural policy for evaluation to the left of the domain.
- Parameters
-
◆ setRightPolicy()
Sets the behavioural policy for evaluation to the right of the domain.
- Parameters
-
The documentation for this class was generated from the following file: