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

#include <Cubic_spline.hh>

Public Member Functions

 CubicSpline ()
 construct generic CubicSpline More...
 
CubicSplineclone () const
 copy constructor More...
 
CubicSplinetrain (const BorderFlag BORDER, const Real START, const Real DELTA, const MathVector< Real > &RESULTS, const std::pair< Real, Real > &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...
 

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

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

construct generic CubicSpline

Referenced by clone().

Member Function Documentation

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

copy constructor

References CubicSpline().

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().

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, basic::options::OptionKeys::cutoutdomain::end, numeric::MathVector< T >::size(), start_, and values_.

Referenced by FdF().

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, basic::options::OptionKeys::cutoutdomain::end, Function(), numeric::MathVector< T >::size(), start_, and values_.

Referenced by 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().

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().

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_.

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::BicubicSpline::train().

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_.

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_.

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

Referenced by Function().

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

Member Data Documentation

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

controls the behavior at x_0 and x_dim-1

Referenced by dF(), and F().

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

gives the arguments as a sequence of equidistant points

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

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

second order derivatives

Referenced by Derivative(), Function(), and get_dsecox().

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

Referenced by dF(), F(), and get_start().

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

f(x)

Referenced by Derivative(), dF(), F(), Function(), and get_values().


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