Storage container for a tension spline interpolation. More...
#include <tension_spline.hpp>
Public Types | |
typedef BluePrintFactory< TensionSpline > | Factory |
Generates blueprints for this class. More... | |
Public Member Functions | |
double | dderivative (const double &x) const |
Spline second derivative. More... | |
double | derivative (const double &x) const |
Spline derivative. More... | |
const Array< double > & | domain () const |
The discretised domain for this spline. More... | |
double | operator() (const double &x) const |
Spline function. More... | |
TensionSpline () | |
Default constructor. More... | |
template<typename Derived > | |
TensionSpline (const BluePrint< Derived > &blueprint) | |
Blueprint constructor. More... | |
virtual | ~TensionSpline () |
Public Member Functions inherited from ecl::BluePrintFactory< TensionSpline > | |
virtual | ~BluePrintFactory () |
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. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from ecl::BluePrintFactory< TensionSpline > | |
static blueprints::C2TensionSpline | Natural (const Array< double > &x_set, const Array< double > &y_set, const double &tau) |
Tension spline blueprint satisfying y, y' and y'' continuity with y''_0 = y''_f = 0. More... | |
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 101 of file tension_spline.hpp.
Generates blueprints for this class.
Definition at line 108 of file tension_spline.hpp.
|
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 119 of file tension_spline.hpp.
|
inlinevirtual |
Definition at line 120 of file tension_spline.hpp.
|
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.
Since this is not explicit, it will also allow assignment.
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 148 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 51 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 42 of file tension_spline.cpp.
|
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 195 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 33 of file tension_spline.cpp.
|
friend |
Definition at line 155 of file tension_spline.hpp.
|
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 228 of file tension_spline.hpp.
|
private |
Definition at line 216 of file tension_spline.hpp.
|
private |
Definition at line 217 of file tension_spline.hpp.
|
private |
Definition at line 218 of file tension_spline.hpp.