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

#include <u_smspl3_curve1d.hpp>

Classes

struct  Coeffs
 
struct  Node
 

Public Types

typedef std::vector< NodeNodes
 

Public Member Functions

 USmspl3Curve1d (double alpha=0)
 
 USmspl3Curve1d (const Nodes &nodes, double alpha=0.)
 
virtual ~USmspl3Curve1d ()
 
virtual void approximate (const Nodes &nodes, double alpha=0.)
 
virtual double operator() (double p) const
 
virtual bool ready () const
 
virtual void addNode (const Node &node, int id)
 
virtual bool removeNode (size_t id)
 

Protected Types

typedef std::vector< CoeffsCoeffsAr
 

Protected Member Functions

double Am (size_t i, size_t j, const Nodes &nodes) const
 
double Hm (size_t i, size_t j, const Nodes &nodes) const
 
double Km (size_t i, size_t j, const Nodes &nodes) const
 
double bv (size_t i, const Nodes &nodes) const
 
bool calc_coeffs (const Nodes &nodes, double alpha, CoeffsAr &coeffs)
 
double get_s (double p) const
 

Protected Attributes

double m_alpha
 
CoeffsAr m_coeffs
 
U2dBox m_bound
 
bool m_ready
 

Detailed Description

1D smooth spline curve with weights for provided nodes. Number of nodes should be > 3

Member Typedef Documentation

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

Smoothing parameter.

Constructor & Destructor Documentation

USmspl3Curve1d::USmspl3Curve1d ( double  alpha = 0)

Empty curve with default smoothing parameter.

USmspl3Curve1d::USmspl3Curve1d ( const Nodes &  nodes,
double  alpha = 0. 
)

Construct curve width provided nodes and smoothing parameter.

virtual USmspl3Curve1d::~USmspl3Curve1d ( )
virtual

Destructor.

Member Function Documentation

virtual void USmspl3Curve1d::addNode ( const Node node,
int  id 
)
inlinevirtual

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

virtual void USmspl3Curve1d::approximate ( const Nodes &  nodes,
double  alpha = 0. 
)
virtual

General approximation method.

bool USmspl3Curve1d::calc_coeffs ( const Nodes &  nodes,
double  alpha,
CoeffsAr coeffs 
)
protected

Calculate spline coefficients

double USmspl3Curve1d::get_s ( double  p) const
inlineprotected

Calculates spline on corresponded segment

virtual double USmspl3Curve1d::operator() ( double  p) const
virtual

Get curve value for provided argument.

virtual bool USmspl3Curve1d::ready ( ) const
inlinevirtual

True if spline constructed and object is ready to approximate.

virtual bool USmspl3Curve1d::removeNode ( size_t  id)
inlinevirtual

Remove node with provided id. Return false on error.

Member Data Documentation

double USmspl3Curve1d::m_alpha
protected

Spline coefficients

U2dBox USmspl3Curve1d::m_bound
protected

Is object ready

CoeffsAr USmspl3Curve1d::m_coeffs
protected

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


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