|
BALL 1.5.0
|
#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 |
Public Member Functions inherited from BALL::PiecewiseFunction | |
| PiecewiseFunction () | |
| PiecewiseFunction (const PiecewiseFunction &function) | |
| PiecewiseFunction (const std::vector< Interval > &intervals, const std::vector< Coefficients > &coeffs) | |
| virtual | ~PiecewiseFunction () |
| PiecewiseFunction & | operator= (const PiecewiseFunction &function) |
| void | clear () |
| void | setIntervals (const std::vector< Interval > &intervals) |
| const std::vector< Interval > & | getIntervals () const |
| const Interval & | getInterval (double x) const |
| const Interval & | getInterval (Position index) const |
| Position | getIntervalIndex (double x) const |
| const Interval & | getRange () const |
| void | setCoefficients (const vector< Coefficients > &coefficients) |
| const std::vector< Coefficients > & | getCoefficients () const |
| const Coefficients & | getCoefficients (double x) const |
| const Coefficients & | getCoefficients (Position index) const |
| void | set (const std::vector< Interval > &intervals, const std::vector< Coefficients > &coeffs) |
| bool | isInRange (double x) const |
| virtual bool | isValid () const |
| bool | operator== (const PiecewiseFunction &function) const |
Debugging and Diagnostics | |
| Size | degree_ |
| virtual void | dump (std::ostream &s=std::cout, Size depth=0) const |
Additional Inherited Members | |
Protected Attributes inherited from BALL::PiecewiseFunction | |
| std::vector< Interval > | intervals_ |
| std::vector< Coefficients > | coefficients_ |
| bool | valid_ |
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
![\[\sum_{i=0}^{d} a_i^{(k)} (x - x_0^{(k)})^i\]](../../form_32.png)
, where 

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 |
Destructor
|
virtual |
Clear method
|
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
|
protected |
Definition at line 111 of file piecewisePolynomial.h.