#include <piecewiseFunction.h>

Public Member Functions |
|
|
Constructors and Destructors
|
|
| PiecewiseFunction () | |
| Default constructor. |
|
| PiecewiseFunction (const PiecewiseFunction &function) | |
| Copy constructor. |
|
| PiecewiseFunction (const std::vector< Interval > &intervals, const std::vector< Coefficients > &coeffs) | |
| Detailed constructor. |
|
| virtual | ~PiecewiseFunction () |
| Destructor. |
|
|
Assignment
|
|
| PiecewiseFunction & | operator= (const PiecewiseFunction &function) |
| Assignemnt operator. |
|
| void | clear () |
| Clear function. |
|
|
Accessors
|
|
| void | setIntervals (const std::vector< Interval > &intervals) |
| Set the intervals for the piecewise
definition. |
|
| const std::vector< Interval > & | getIntervals () const |
| Get all the intervals. |
|
| const Interval & | getInterval (double x) const throw (Exception::OutOfRange) |
| Get the interval a given x belongs
to. |
|
| const Interval & | getInterval (Position index) const throw (Exception::IndexOverflow) |
| Get interval limits by
index. |
|
| Position | getIntervalIndex (double x) const throw (Exception::OutOfRange) |
| Get the interval index for a given
x. |
|
| const Interval & | getRange () const |
| Return the range of the
definition. |
|
| void | setCoefficients (const vector< Coefficients > &coefficients) |
| Set the coefficients. |
|
| const std::vector< Coefficients > & | getCoefficients () const |
| const Coefficients & | getCoefficients (double x) const throw (Exception::OutOfRange) |
| Get the coefficients for a given
x. |
|
| const Coefficients & | getCoefficients (Position index) const throw (Exception::IndexOverflow) |
| get coefficients from
index |
|
| virtual double | operator() (double x) const |
| compute the value of the piecewise
function data for a given x |
|
| void | set (const std::vector< Interval > &intervals, const std::vector< Coefficients > &coeffs) |
|
Predicates
|
|
| bool | isInRange (double x) const |
| Check whether a given x is in the
range of definition. |
|
| virtual bool | isValid () const |
| check validity of the
definition |
|
| bool | operator== (const PiecewiseFunction &function) 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 |
|
| std::vector< Interval > | intervals_ |
| std::vector< Coefficients > | coefficients_ |
| bool | valid_ |
This class provides the interface for piecewise functions needed as representation of radial distribution functions (
Function interface.| void BALL::PiecewiseFunction::setCoefficients | ( | const vector< Coefficients > & | coefficients | ) |
Set the coefficients.
Note that this method does not check the vector of coefficients for sanity.
| void BALL::PiecewiseFunction::setIntervals | ( | const std::vector< Interval > & | intervals | ) |
Set the intervals for the piecewise definition.
Note that this method does not check the definition of the intervals for sanity.
1.5.8