Public Types | Public Member Functions | Private Attributes | Friends
ecl::TensionSpline Class Reference

Storage container for a tension spline interpolation. More...

#include <tension_spline.hpp>

Inheritance diagram for ecl::TensionSpline:
Inheritance graph
[legend]

List of all members.

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.
 TensionSpline ()
 Default constructor.
template<typename Derived >
 TensionSpline (const BluePrint< Derived > &blueprint)
 Blueprint constructor.
virtual ~TensionSpline ()

Private Attributes

Array< double > discretised_domain
Array< TensionFunctionfunctions
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.

Detailed Description

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.

See also:
CubicSpline, Math::Splines.

Definition at line 95 of file tension_spline.hpp.


Member Typedef Documentation

Generates blueprints for this class.

Definition at line 100 of file tension_spline.hpp.


Constructor & Destructor Documentation

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 111 of file tension_spline.hpp.

virtual ecl::TensionSpline::~TensionSpline ( ) [inline, virtual]

Definition at line 112 of file tension_spline.hpp.

template<typename Derived >
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).

Parameters:
blueprint: the blue print to use to generate this instance.
See also:
ecl::BluePrintFactory<TensionSpline>.

Definition at line 140 of file tension_spline.hpp.


Member Function Documentation

double ecl::TensionSpline::dderivative ( const double &  x) const

Spline second derivative.

Extract the second derivative of the spline.

Parameters:
x: the domain value.
Returns:
double : the second derivative of the spline.
Exceptions:
: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.

Parameters:
x: the domain value.
Returns:
double : the derivative of the spline.
Exceptions:
: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.

Returns:
const Array<double>& : the discretised domain.

Definition at line 187 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.

Parameters:
x: the domain value.
Returns:
double : the spline function's value.
Exceptions:
:StandardException : throws if x is outside the spline range [debug mode only].

Definition at line 29 of file tension_spline.cpp.


Friends And Related Function Documentation

friend class blueprints::C2TensionSpline [friend]

Definition at line 147 of file tension_spline.hpp.

template<typename OutputStream >
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.

Template Parameters:
OutputStream: the type of stream being used.
Parameters:
ostream: the output stream being used.
tension_spline: the tension spline.
Returns:
OutputStream : the output stream.

Definition at line 222 of file tension_spline.hpp.


Member Data Documentation

Definition at line 208 of file tension_spline.hpp.

Definition at line 209 of file tension_spline.hpp.

double ecl::TensionSpline::tension [private]

Definition at line 210 of file tension_spline.hpp.


The documentation for this class was generated from the following files:


ecl_geometry
Author(s): Daniel Stonier
autogenerated on Thu Jun 6 2019 21:17:53