UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Typedefs | Functions
rbm_smooth Namespace Reference

Typedefs

typedef std::vector< std::pair
< double, double > > 
Curve
 

Functions

void SbSmoothing (const double sb_size, const Curve &curve, Curve &resulted_curve)
 
bool extrapolateCurveLeft (const double base_size, const double extra_size, rbm_smooth::Curve &curve, size_t &points_added)
 
bool extrapolateCurveRight (const double base_size, const double extra_size, rbm_smooth::Curve &curve, size_t &points_added)
 

Detailed Description

Curve smoothing namespace.

Typedef Documentation

typedef std::vector< std::pair<double, double> > rbm_smooth::Curve

1D curve.

Function Documentation

bool rbm_smooth::extrapolateCurveLeft ( const double  base_size,
const double  extra_size,
rbm_smooth::Curve curve,
size_t &  points_added 
)

Extrapolate provided curve by adding new points at the left side using least squares linear approximation.

Parameters
base_size- size of base (in term of x-coordinate) for approximation polynim construction.
extra_size- extrapolation area size (in term of x-coordinate).
curve- curve to be extrapolated.
points_added- output parameter with number of points added while extrapolation.
Returns
false on error.
bool rbm_smooth::extrapolateCurveRight ( const double  base_size,
const double  extra_size,
rbm_smooth::Curve curve,
size_t &  points_added 
)

Extrapolate provided curve by adding new points at the right side using least squares linear approximation.

Parameters
base_size- size of base (in term of x-coordinate) for approximation polynim construction.
extra_size- extrapolation area size (in term of x-coordinate).
curve- curve to be extrapolated.
points_added- output parameter with number of points added while extrapolation.
Returns
false on error.
void rbm_smooth::SbSmoothing ( const double  sb_size,
const Curve &  curve,
Curve &  resulted_curve 
)

Smooth provided curve using cosine function on sliding base.

Parameters
sb_size- sliding base size.
curve- y(x) for smoothing. x=curve[].first, y=curve[].second.
resulted_curve- result of smoothing, should be the same size. Will be fitted to curve size otherwise.