Rosetta
Public Member Functions | Private Member Functions | Private Attributes | List of all members
numeric::interpolation::spline::CubicSpline Class Reference

#include <CubicSpline.hh>

Public Member Functions

 CubicSpline ()
 construct generic CubicSpline More...
 
CubicSplineOP clone () const
 copy constructor More...
 
CubicSplinetrain (BorderFlag const BORDER, Real const START, Real const DELTA, MathVector< Real > const &RESULTS, std::pair< Real, Real > const &FIRSTBE)
 
Real F (const Real &ARGUMENT) const
 return value at certain ARGUMENT More...
 
Real sqr (const Real x) const
 
Real dF (const Real &ARGUMENT) const
 return derivative at ARGUMENT More...
 
std::pair< Real, RealFdF (const double &ARGUMENT) const
 return value and derivative at ARGUMENT More...
 
MathVector< Real > const & get_dsecox () const
 get the second order derivatives of the spline More...
 
Real get_start () const
 access to the start value More...
 
Real get_delta () const
 access to the delta value More...
 
const MathVector< Real > & get_values () const
 access to the values More...
 
bool operator== (CubicSpline const &rhs) const
 
bool operator!= (CubicSpline const &rhs) const
 

Private Member Functions

Real Function (const int INDEX_LEFT, const int INDEX_RIGHT, const Real DXP) const
 calculate function between two cells More...
 
Real Derivative (const int INDEX_LEFT, const int INDEX_RIGHT, const Real DXP) const
 calculate derivative between two cells More...
 

Private Attributes

BorderFlag border_
 controls the behavior at x_0 and x_dim-1 More...
 
Real start_
 
Real delta_
 gives the arguments as a sequence of equidistant points More...
 
MathVector< Realvalues_
 f(x) More...
 
MathVector< Realdsecox_
 second order derivatives More...
 

Constructor & Destructor Documentation

◆ CubicSpline()

numeric::interpolation::spline::CubicSpline::CubicSpline ( )
inline

construct generic CubicSpline

Member Function Documentation

◆ clone()

CubicSplineOP numeric::interpolation::spline::CubicSpline::clone ( ) const
inline

copy constructor

Referenced by numeric::interpolation::spline::deep_copy().

◆ Derivative()

Real numeric::interpolation::spline::CubicSpline::Derivative ( const int  INDEX_LEFT,
const int  INDEX_RIGHT,
const Real  DXP 
) const
private

calculate derivative between two cells

Parameters
INDEX_LEFTindex of left grid point
INDEX_RIGHTindex of right grid point
DXPrelative distance from left grid point, must be element [0, 1]
Returns
derivative depending on relative distance DXP

References delta_, dsecox_, and values_.

Referenced by dF(), and F().

◆ dF()

Real numeric::interpolation::spline::CubicSpline::dF ( const Real ARGUMENT) const

return derivative at ARGUMENT

return derivative at certain ARGUMENT

Parameters
ARGUMENTx value
Returns
derivative at ARGUMENT

References border_, delta_, Derivative(), numeric::interpolation::spline::e_Periodic, end, create_a3b_hbs::i, start_, and values_.

Referenced by FdF().

◆ F()

Real numeric::interpolation::spline::CubicSpline::F ( const Real ARGUMENT) const

return value at certain ARGUMENT

Parameters
ARGUMENTx value
Returns
function value at ARGUMENT

References border_, delta_, Derivative(), numeric::interpolation::spline::e_Periodic, end, Function(), create_a3b_hbs::i, start_, and values_.

Referenced by FdF().

◆ FdF()

std::pair< Real, Real > numeric::interpolation::spline::CubicSpline::FdF ( const double ARGUMENT) const

return value and derivative at ARGUMENT

return derivative and value at certain ARGUMENT

Parameters
ARGUMENTx value
Returns
value and derivative at ARGUMENT

References dF(), and F().

◆ Function()

Real numeric::interpolation::spline::CubicSpline::Function ( const int  INDEX_LEFT,
const int  INDEX_RIGHT,
const Real  DXP 
) const
private

calculate function between two cells

Parameters
INDEX_LEFTindex of left grid point
INDEX_RIGHTindex of right grid point
DXPrelative distance from left grid point, must be element [0, 1]
Returns
function depending on relative distance DXP

References delta_, dsecox_, sqr(), and values_.

Referenced by F().

◆ get_delta()

Real numeric::interpolation::spline::CubicSpline::get_delta ( ) const
inline

access to the delta value

Returns
the distance between two support points of the spline

References delta_.

◆ get_dsecox()

MathVector< Real> const& numeric::interpolation::spline::CubicSpline::get_dsecox ( ) const
inline

get the second order derivatives of the spline

Returns
the second order derivatives at the support points of the spline

References dsecox_.

Referenced by numeric::interpolation::spline::TricubicSpline::train(), and numeric::interpolation::spline::PolycubicSpline< N >::train().

◆ get_start()

Real numeric::interpolation::spline::CubicSpline::get_start ( ) const
inline

access to the start value

Returns
the start of the interval the spline is defined on

References start_.

◆ get_values()

const MathVector< Real>& numeric::interpolation::spline::CubicSpline::get_values ( ) const
inline

access to the values

Returns
the function values at the support points of the spline

References values_.

◆ operator!=()

bool numeric::interpolation::spline::CubicSpline::operator!= ( CubicSpline const &  rhs) const
inline

◆ operator==()

bool numeric::interpolation::spline::CubicSpline::operator== ( CubicSpline const &  rhs) const
inline

References border_, delta_, dsecox_, start_, and values_.

◆ sqr()

Real numeric::interpolation::spline::CubicSpline::sqr ( const Real  x) const
inline

References x.

Referenced by Function().

◆ train()

CubicSpline & numeric::interpolation::spline::CubicSpline::train ( BorderFlag const  BORDER,
Real const  START,
Real const  DELTA,
MathVector< Real > const &  RESULTS,
std::pair< Real, Real > const &  FIRSTBE 
)

Member Data Documentation

◆ border_

BorderFlag numeric::interpolation::spline::CubicSpline::border_
private

controls the behavior at x_0 and x_dim-1

Referenced by dF(), F(), operator==(), and train().

◆ delta_

Real numeric::interpolation::spline::CubicSpline::delta_
private

gives the arguments as a sequence of equidistant points

Referenced by Derivative(), dF(), F(), Function(), get_delta(), operator==(), and train().

◆ dsecox_

MathVector<Real> numeric::interpolation::spline::CubicSpline::dsecox_
private

second order derivatives

Referenced by Derivative(), Function(), get_dsecox(), operator==(), and train().

◆ start_

Real numeric::interpolation::spline::CubicSpline::start_
private

Referenced by dF(), F(), get_start(), operator==(), and train().

◆ values_

MathVector<Real> numeric::interpolation::spline::CubicSpline::values_
private

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