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

Public Member Functions

 Spline ()
 Constructor by default.
 
 Spline (int N0, double *x0, double *z0, double minrc, int N1=0, double *x1=NULL, double *z1=NULL)
 
 ~Spline ()
 Destructor.
 
void NewSpline (int N, double *x, double *z, int N1, double *x1, double *z1, double rc)
 
void GetPoints (int N1, double *x1, double *z1, int flag, int n1=-1, int n2=-1)
 
int GetN ()
 Method returns approximated function nodes number.
 
void GetXZ (double *x1, double *z1)
 
void GetABCD (double *a, double *b, double *c, double *d)
 Method allows to get N-1 spline coefficients.
 
double GetSigma ()
 Method returns mean-square deviation between spline and initial function.
 
double GetAmax ()
 Method returns maximal absolute deviation between spline and initial curve.
 
double GetMinRc ()
 Method returns spline minimal curvature radius.
 
bool SplineFunction (double xt, double &zt)
 
bool DerSplineFunction (double xt, double &zt)
 
bool Der2SplineFunction (double xt, double &zt)
 
bool CurvitySplineFunction (double xt, double &zt)
 
bool RadiusCurvitySplineFunction (double xt, double &zt)
 
bool SplineIntersection (double x0, double z0, double x1, double z1, double eps, double &xg, double &zg)
 
bool SpIntersect (double x, double z, double x2, double z2, double &resultX, double &resultZ)
 

Constructor & Destructor Documentation

Spline::Spline ( int  N0,
double *  x0,
double *  z0,
double  minrc,
int  N1 = 0,
double *  x1 = NULL,
double *  z1 = NULL 
)

Constructor analyses N nodes (x,z) and adds N1 immovable nodes (x1,z1) rc - curvature minimal radius, which sets the smoothing

Member Function Documentation

bool Spline::CurvitySplineFunction ( double  xt,
double &  zt 
)

Function curvature calculation in the arbitrary point inside available x-argument values range (cubic spline coefficients are used)

bool Spline::Der2SplineFunction ( double  xt,
double &  zt 
)

Function second-order derivative calculation in the arbitrary point inside available x-argument values range (cubic spline coefficients are used)

bool Spline::DerSplineFunction ( double  xt,
double &  zt 
)

Function first-order derivative calculation in the arbitrary point inside available x-argument values range (cubic spline coefficients are used)

void Spline::GetPoints ( int  N1,
double *  x1,
double *  z1,
int  flag,
int  n1 = -1,
int  n2 = -1 
)

Method calculates the values of spline, first- and second-order derivatives, curvature or curvature radius - corresponding to the flag, in N1 points, located inside of available arguments values range, (constant step between points) , or between nodes n1 and n2

void Spline::GetXZ ( double *  x1,
double *  z1 
)

Method returns approximated function nodes coordinates. After smoothing z-coordinates of nodes will be another their values can be derived from coefficient d in method GetABCD

bool Spline::RadiusCurvitySplineFunction ( double  xt,
double &  zt 
)

Function curvature calculation in the arbitrary point inside available x-argument values range (cubic spline coefficients are used)

bool Spline::SplineFunction ( double  xt,
double &  zt 
)

Function value calculation in the arbitrary point inside available x-argument values range (cubic spline coefficients are used)

bool Spline::SplineIntersection ( double  x0,
double  z0,
double  x1,
double  z1,
double  eps,
double &  xg,
double &  zg 
)

Procedure of spline/segment intersection point calculation the definition of the point of intersection of the ray, set by the segment (x0,z0) and (x1,z1), and the curve, set by the third-order polynomial.


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