$search
Storage container for a tension spline interpolation. More...
#include <tension_spline.hpp>
Public Types | |
typedef BluePrintFactory < TensionSpline > | Factory |
Generates blueprints for this class. | |
Public Member Functions | |
double | dderivative (const double &x) const ecl_assert_throw_decl(StandardException) |
Spline second derivative. | |
double | derivative (const double &x) const ecl_assert_throw_decl(StandardException) |
Spline derivative. | |
const Array< double > & | domain () const |
The discretised domain for this spline. | |
double | operator() (const double &x) const ecl_assert_throw_decl(StandardException) |
Spline function. | |
template<typename Derived > | |
TensionSpline (const BluePrint< Derived > &blueprint) | |
Blueprint constructor. | |
TensionSpline () | |
Default constructor. | |
virtual | ~TensionSpline () |
Private Attributes | |
Array< double > | discretised_domain |
Array< TensionFunction > | functions |
double | tension |
Friends | |
class | blueprints::C2TensionSpline |
template<typename OutputStream > | |
OutputStream & | operator<< (OutputStream &ostream, const TensionSpline &tension_spline) |
Streaming output insertion operator for for tension splines. |
Storage container for a tension spline interpolation.
These interpolations are very similar to cubic splines, but allow an extra parameter for configuration called the tension of the interpolation. The tension variable effectively tightens the curve among the data points, resulting in a spline interpolation that looks very similar to the linear blended interpolations. When the tension approaches zero, this interpolation defaults to a cubic spline interpolation.
Definition at line 82 of file tension_spline.hpp.
Generates blueprints for this class.
Definition at line 87 of file tension_spline.hpp.
ecl::TensionSpline::TensionSpline | ( | ) | [inline] |
Default constructor.
Don't really need this, but things like vectors and array containers need it so they can reserve the appropriate storage.
Definition at line 98 of file tension_spline.hpp.
virtual ecl::TensionSpline::~TensionSpline | ( | ) | [inline, virtual] |
Definition at line 99 of file tension_spline.hpp.
ecl::TensionSpline::TensionSpline | ( | const BluePrint< Derived > & | blueprint | ) | [inline] |
Blueprint constructor.
Constructor that allows automatic generation from an existing blueprint. This can be used simply in the following manner for any static element belonging to the BluePrintFactory.
double tension = 4.0; Array<double> x_set(5); Array<double> y_set(5); x_set = 0.0, 1.0, 2.0, 3.0, 4.0; y_set = 1.0, 2.0, 1.0, 3.0, 4.0; TensionSpline tension_spline = TensionSpline::Natural(x_set,y_set,tension);
Since this is not explicit, it will also allow assignment.
tension_spline = TensionSpline::Natural(x_set,y_set,tension);
This will emit a compile time failure if the template argument does not conform to the blueprints concept (refer to ecl_concepts' documentation).
blueprint | : the blue print to use to generate this instance. |
Definition at line 127 of file tension_spline.hpp.
double ecl::TensionSpline::dderivative | ( | const double & | x | ) | const |
Spline second derivative.
Extract the second derivative of the spline.
x | : the domain value. |
: | StandardException : throws if x is outside the spline range [debug mode only]. |
Definition at line 47 of file tension_spline.cpp.
double ecl::TensionSpline::derivative | ( | const double & | x | ) | const |
Spline derivative.
Extract the derivative of the spline at the indicated value.
x | : the domain value. |
: | StandardException : throws if x is outside the spline range [debug mode only]. |
Definition at line 38 of file tension_spline.cpp.
const Array<double>& ecl::TensionSpline::domain | ( | ) | const [inline] |
The discretised domain for this spline.
This returns the array of discretised time values that define the domains of each polynomial within the spline.
Definition at line 174 of file tension_spline.hpp.
double ecl::TensionSpline::operator() | ( | const double & | x | ) | const |
Spline function.
Extract the spline function's value at the indicated location.
x | : the domain value. |
: | StandardException : throws if x is outside the spline range [debug mode only]. |
Definition at line 29 of file tension_spline.cpp.
friend class blueprints::C2TensionSpline [friend] |
Definition at line 134 of file tension_spline.hpp.
OutputStream& operator<< | ( | OutputStream & | ostream, | |
const TensionSpline & | tension_spline | |||
) | [friend] |
Streaming output insertion operator for for tension splines.
Streaming output insertion operator for tension splines. This lists in algebraic form the sequence of tension functions constituting the spline.
OutputStream | : the type of stream being used. |
ostream | : the output stream being used. | |
tension_spline | : the tension spline. |
Definition at line 209 of file tension_spline.hpp.
Array<double> ecl::TensionSpline::discretised_domain [private] |
Definition at line 195 of file tension_spline.hpp.
Array<TensionFunction> ecl::TensionSpline::functions [private] |
Definition at line 196 of file tension_spline.hpp.
double ecl::TensionSpline::tension [private] |
Definition at line 197 of file tension_spline.hpp.