12 #ifndef ECL_GEOMETRY_CUBIC_SPLINE_HPP_ 13 #define ECL_GEOMETRY_CUBIC_SPLINE_HPP_ 20 #include <ecl/config/macros.hpp> 21 #include <ecl/concepts/macros.hpp> 22 #include <ecl/concepts/streams.hpp> 23 #include <ecl/concepts/containers.hpp> 24 #include <ecl/containers/array.hpp> 25 #include <ecl/exceptions/standard_exception.hpp> 26 #include <ecl/utilities/blueprints.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 () {};
169 friend class blueprints::DerivativeHeuristicCubicSpline;
170 friend class blueprints::C2CubicSpline;
206 const Array<double>& domain() {
return discretised_domain; }
215 const Array<CubicPolynomial>& polynomials() {
return cubic_polynomials; }
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 {
304 virtual ~C2CubicSpline() {};
373 DerivativeHeuristicCubicSpline() {};
391 virtual ~DerivativeHeuristicCubicSpline() {};
Array< CubicPolynomial > cubic_polynomials
Defines validating functionality for the streams concept.
OutputStream & operator<<(OutputStream &ostream, const Void void_object)
Output stream operator for Void objects.
Standard exception type, provides code location and error string.
Storage container for a cubic spline interpolation.
#define ecl_assert_throw_decl(exception)
Assure throw exception declaration.
#define ecl_compile_time_concept_check(Model)
Compile time concept checking assertion.
This is a parent template for blueprints using crtp.