12 #ifndef ECL_GEOMETRY_SPLINE_FUNCTION_HPP_ 13 #define ECL_GEOMETRY_SPLINE_FUNCTION_HPP_ 47 virtual double operator()(
const double &x)
const = 0;
53 virtual double derivative(
const double &x)
const = 0;
59 virtual double dderivative(
const double &x)
const = 0;
87 template <
typename Function>
99 SplineFunction (
const double& time_begin,
const double& time_end,
const Function& f) : function(f) {
100 time_domain << time_begin, time_end;
123 return function.derivative(x);
134 return function.dderivative(x);
Embedded control libraries.
Template wrapper for a generic spline function.
Array< double, 2 > time_domain
#define ecl_assert_throw(expression, exception)
double operator()(const double &x) const
Access the value of the spline function at the specified value.
virtual ~SplineFunction()
SplineFunction(const double &time_begin, const double &time_end, const Function &f)
Constructor, copies across an already existing spline function type and wraps it. ...
const Array< double, 2 > & domain()
Get access to the domain for this spline function.
virtual ~GenericSplineFunction()
This is a parent class for generic spline functions.
double dderivative(const double &x) const
Access the value of the spline function's 2nd derivative at the specified value.
double derivative(const double &x) const
Access the value of the spline function's derivative at the specified value.