12 #ifndef ECL_GEOMETRY_CUBIC_SPLINE_HPP_
13 #define ECL_GEOMETRY_CUBIC_SPLINE_HPP_
40 namespace blueprints {
43 class DerivativeHeuristicCubicSpline;
59 class ECL_PUBLIC BluePrintFactory< CubicSpline > {
72 static blueprints::C2CubicSpline Natural(
const Array<double>& x_set,
const Array<double>& y_set);
85 static blueprints::C2CubicSpline ContinuousDerivatives(
86 const Array<double>& x_set,
const Array<double>& y_set,
const double ydot_0,
const double ydot_f);
100 static blueprints::DerivativeHeuristicCubicSpline DerivativeHeuristic(
101 const Array<double>& x_set,
const Array<double>& y_set,
const double ydot_0,
const double ydot_f);
103 virtual ~BluePrintFactory() {}
123 class ECL_PUBLIC CubicSpline :
public BluePrintFactory< CubicSpline > {
160 template<
typename Derived>
161 CubicSpline(
const BluePrint< Derived > &blueprint) {
162 blueprint.implementApply(*
this);
164 virtual ~CubicSpline () {};
179 double operator()(
const double &x)
const;
188 double derivative(
double x)
const;
197 double dderivative(
double x)
const;
231 template <
typename OutputStream>
232 friend OutputStream&
operator << (OutputStream &ostream,
const CubicSpline &cubic_spline);
235 Array<double> discretised_domain;
238 Array<CubicPolynomial> cubic_polynomials;
245 template <
typename OutputStream>
261 namespace blueprints {
302 const double ydot_0,
const double ydot_f);
304 virtual ~C2CubicSpline() {};
373 DerivativeHeuristicCubicSpline() {};
389 const double ydot_0,
const double ydot_f);
391 virtual ~DerivativeHeuristicCubicSpline() {};