#include <piecewisePolynomial.h>
Public Member Functions |
|
Constructors and Destructors
|
|
PiecewisePolynomial () | |
Default constructor. |
|
PiecewisePolynomial (const PiecewisePolynomial &polynomial) | |
Copy constructor. |
|
PiecewisePolynomial (Size degree, const std::vector< Interval > &intervals, const std::vector< Coefficients > &coefficients) | |
Detailed Constructor. |
|
virtual | ~PiecewisePolynomial () |
Destructor. |
|
Assignment
|
|
PiecewisePolynomial & | operator= (const PiecewisePolynomial &poly) |
Assignment operator. |
|
virtual void | clear () |
Clear method. |
|
Accessors
|
|
void | set (Size degree, const std::vector< Interval > &intervals, const std::vector< Coefficients > &coeffs) |
Set the instance
manually. |
|
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 |
Equality operator. |
|
Debugging and Diagnostics
|
|
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const |
Dumps the whole content of the
object. |
|
Protected Attributes |
|
Size | degree_ |
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.
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