Class Polynom

Class Documentation

class bitbots_splines::Polynom

Polynom

Simple one dimensional polynom class for spline generation

Public Functions

Polynom()

Default and initial degree initialization

explicit Polynom(unsigned int degree)
const std::vector<double> &getCoefs() const

Access to coefficient indexed from constant to higher degree

std::vector<double> &getCoefs()
const double &operator()(size_t index) const

Access to coefficient

double &operator()(size_t index)
size_t degree() const

Return polynom degree -1 mean empty polynom

double pos(double x) const

Polynom evaluation, its first, second and third derivative at given x

double vel(double x) const
double acc(double x) const
double jerk(double x) const
void operator*=(double coef)

Some useful operators

void operator+=(const Polynom &p)
void shift(double delta)

Update the polynom coefficients by applying delta offset on X abscisse

Private Members

std::vector<double> coefs_

Polynom coefficients