12 #ifndef ECL_SMOOTH_LINEAR_SPLINE_HPP_ 13 #define ECL_SMOOTH_LINEAR_SPLINE_HPP_ 19 #include <ecl/config/macros.hpp> 20 #include <ecl/concepts/streams.hpp> 21 #include <ecl/containers/array.hpp> 22 #include <ecl/exceptions/data_exception.hpp> 23 #include <ecl/exceptions/standard_exception.hpp> 53 SmoothLinearSpline() {}
77 SmoothLinearSpline(
const Array<double>& x_data,
const Array<double>& y_data,
double a_max)
throw (DataException<int>);
79 virtual ~SmoothLinearSpline() {}
120 const Array<double>& domain()
const {
return discretised_domain; }
136 static SmoothLinearSpline Interpolation(
const Array<double>& x_data,
const Array<double>& y_data,
double a_max)
throw (DataException<int>)
139 return SmoothLinearSpline(x_data, y_data, a_max);
140 }
catch ( DataException<int> &e ) {
141 throw DataException<int>(
LOC,e);
143 return SmoothLinearSpline();
162 template <
typename OutputStream>
163 friend OutputStream&
operator << (OutputStream &ostream,
const SmoothLinearSpline &smooth_linear_spline);
166 Array<double> discretised_domain;
167 Array<LinearFunction> segments;
168 Array<QuinticPolynomial> corners;
175 template <
typename OutputStream>
180 ostream << smooth_linear_spline.
segments[0] <<
"\n";
181 for (
unsigned int i = 1; i < smooth_linear_spline.
segments.size(); ++i ) {
182 ostream << smooth_linear_spline.
corners[i-1] <<
"\n";
183 ostream << smooth_linear_spline.
segments[i] <<
"\n";
Storage container for a smoothed linear spline interpolation.
Defines validating functionality for the streams concept.
#define LOC
Stringify the line of code you are at.
#define ecl_geometry_PUBLIC
OutputStream & operator<<(OutputStream &ostream, const Void void_object)
Output stream operator for Void objects.
Array< QuinticPolynomial > corners
#define ecl_assert_throw_decl(exception)
Assure throw exception declaration.
#define ecl_compile_time_concept_check(Model)
Compile time concept checking assertion.
Array< LinearFunction > segments