Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

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

construct generic CubicSpline

Member Function Documentation

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

copy constructor

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

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, 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(), 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(), numeric::interpolation::spline::PolycubicSpline< N >::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_.

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

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

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

References numeric::crick_equations::x().

Referenced by Function().

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

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

controls the behavior at x_0 and x_dim-1

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

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

gives the arguments as a sequence of equidistant points

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

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

second order derivatives

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

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

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

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

f(x)

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


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