#include <BALL/MATHS/piecewisePolynomial.h>
Public Member Functions | |
Constructors and Destructors | |
PiecewisePolynomial () | |
PiecewisePolynomial (const PiecewisePolynomial &polynomial) | |
PiecewisePolynomial (Size degree, const std::vector< Interval > &intervals, const std::vector< Coefficients > &coefficients) | |
virtual | ~PiecewisePolynomial () |
Assignment | |
PiecewisePolynomial & | operator= (const PiecewisePolynomial &poly) |
virtual void | clear () |
Accessors | |
void | set (Size degree, const std::vector< Interval > &intervals, const std::vector< Coefficients > &coeffs) |
void | setDegree (Size degree) |
set the degree of the polynomial | |
Size | getDegree () const |
get the degree of the polynomial | |
virtual double | operator() (double x) const |
compute the value of the PiecewisePolynomial at a given x | |
Predicates | |
bool | operator== (const PiecewisePolynomial &poly) const |
Debugging and Diagnostics | |
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const |
Protected Attributes | |
Size | degree_ |
Piecewise polynomial curve object. This class provides a trivial implementation of piecewise polynomial curves. More useful spline/B-spline implementations might follow in the future. The PPCurves are of the form
, where is the index of the interval and is the overall degree of the PPCurve. Note that there is no warranty that the defined curve is continuously differentiable or even continuous.
Definition at line 27 of file piecewisePolynomial.h.
BALL::PiecewisePolynomial::PiecewisePolynomial | ( | ) |
Default constructor
BALL::PiecewisePolynomial::PiecewisePolynomial | ( | const PiecewisePolynomial & | polynomial | ) |
Copy constructor
BALL::PiecewisePolynomial::PiecewisePolynomial | ( | Size | degree, | |
const std::vector< Interval > & | intervals, | |||
const std::vector< Coefficients > & | coefficients | |||
) |
Detailed Constructor. This constructor does not check sanity of the arguments
virtual BALL::PiecewisePolynomial::~PiecewisePolynomial | ( | ) | [virtual] |
Destructor
virtual void BALL::PiecewisePolynomial::clear | ( | ) | [virtual] |
Clear method
Reimplemented from BALL::PiecewiseFunction.
virtual void BALL::PiecewisePolynomial::dump | ( | std::ostream & | s = std::cout , |
|
Size | depth = 0 | |||
) | const [virtual] |
Dumps the whole content of the object
Reimplemented from BALL::PiecewiseFunction.
Size BALL::PiecewisePolynomial::getDegree | ( | ) | const |
get the degree of the polynomial
compute the value of the PiecewisePolynomial at a given x
Reimplemented from BALL::PiecewiseFunction.
PiecewisePolynomial& BALL::PiecewisePolynomial::operator= | ( | const PiecewisePolynomial & | poly | ) |
Assignment operator
bool BALL::PiecewisePolynomial::operator== | ( | const PiecewisePolynomial & | poly | ) | const |
Equality operator
void BALL::PiecewisePolynomial::set | ( | Size | degree, | |
const std::vector< Interval > & | intervals, | |||
const std::vector< Coefficients > & | coeffs | |||
) |
Set the instance manually
void BALL::PiecewisePolynomial::setDegree | ( | Size | degree | ) |
set the degree of the polynomial
Size BALL::PiecewisePolynomial::degree_ [protected] |
Definition at line 111 of file piecewisePolynomial.h.