12 #ifndef ECL_GEOMETRY_SPLINE_FUNCTION_HPP_
13 #define ECL_GEOMETRY_SPLINE_FUNCTION_HPP_
41 virtual ~GenericSplineFunction() {};
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;
68 const Array<double,2>& domain() {
return time_domain; }
71 Array<double,2> time_domain;
87 template <
typename Function>
88 class ECL_PUBLIC SplineFunction :
public GenericSplineFunction {
99 SplineFunction (
const double& time_begin,
const double& time_end,
const Function& f) : function(
f) {
100 time_domain << time_begin, time_end;
102 virtual ~SplineFunction() {};
110 double operator()(
const double &x)
const {
121 double derivative(
const double &x)
const {
123 return function.derivative(x);
132 double dderivative(
const double &x)
const {
134 return function.dderivative(x);