UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
SmoothCubicSpline1d Class Reference

#include <u_smooth_cubic_spline1d.hpp>

Inheritance diagram for SmoothCubicSpline1d:
UCurve1d< U2dWPoint >

Classes

struct  Coeffs
 

Public Member Functions

 SmoothCubicSpline1d ()
 
 SmoothCubicSpline1d (const U2dWPoints &nodes, double alpha)
 
virtual ~SmoothCubicSpline1d ()
 
virtual double operator() (double x) const
 
virtual void approximate (const U2dWPoints &nodes, double alpha)
 
virtual bool ready () const
 
virtual void addNode (const U2dWPoint &, int)
 
virtual bool removeNode (size_t)
 

Protected Types

typedef std::vector< CoeffsCoeffsAr
 

Protected Member Functions

double Am (size_t i, size_t j, const U2dWPoints &nodes) const
 
double Hm (size_t i, size_t j, const std::vector< double > &delta_vec) const
 
double Km (size_t i, size_t j, const U2dWPoints &nodes) const
 
double bv (size_t i, const U2dWPoints &nodes) const
 
bool calc_coeffs (const U2dWPoints &nodes, double alpha, CoeffsAr &coeffs)
 
double get_s (double x) const
 

Protected Attributes

CoeffsAr m_coeffs
 
U2dBox m_bound
 
bool m_ready
 

Detailed Description

Calculates 1D smooth spline with weights for provided nodes. Number of nodes should be > 3, with different x-coordinates

Member Typedef Documentation

typedef std::vector<Coeffs> SmoothCubicSpline1d::CoeffsAr
protected

Spline coefficients

Constructor & Destructor Documentation

SmoothCubicSpline1d::SmoothCubicSpline1d ( )

Empty curve

SmoothCubicSpline1d::SmoothCubicSpline1d ( const U2dWPoints &  nodes,
double  alpha 
)

Construct curve width provided nodes

virtual SmoothCubicSpline1d::~SmoothCubicSpline1d ( )
virtual

Destructor.

Member Function Documentation

virtual void SmoothCubicSpline1d::addNode ( const U2dWPoint ,
int   
)
inlinevirtual

Add new point to the curve at index = id. If id < 0 or out of range then add new last point.

Implements UCurve1d< U2dWPoint >.

virtual void SmoothCubicSpline1d::approximate ( const U2dWPoints &  nodes,
double  alpha 
)
virtual

General approximation method

bool SmoothCubicSpline1d::calc_coeffs ( const U2dWPoints &  nodes,
double  alpha,
CoeffsAr coeffs 
)
protected

Calculate spline coefficients

double SmoothCubicSpline1d::get_s ( double  x) const
inlineprotected

Calculates spline on corresponded segment

virtual double SmoothCubicSpline1d::operator() ( double  x) const
virtual

Get curve value for provided argument

Implements UCurve1d< U2dWPoint >.

virtual bool SmoothCubicSpline1d::ready ( ) const
inlinevirtual

True if spline constructed and object is ready to approximate

Implements UCurve1d< U2dWPoint >.

virtual bool SmoothCubicSpline1d::removeNode ( size_t  )
inlinevirtual

Remove node with provided id. Return false on error.

Implements UCurve1d< U2dWPoint >.

Member Data Documentation

U2dBox SmoothCubicSpline1d::m_bound
protected

Is object ready

CoeffsAr SmoothCubicSpline1d::m_coeffs
protected

Curve boundaries (z-coordinate is only form boundaries points)


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