#include <piecewiseFunction.h>
Inheritance diagram for PiecewiseFunction:

Public Member Functions | |
Constructors and Destructors | |
| PiecewiseFunction () throw () | |
| Default constructor. | |
| PiecewiseFunction (const PiecewiseFunction &function) throw () | |
| Copy constructor. | |
| PiecewiseFunction (const std::vector< Interval > &intervals, const std::vector< Coefficients > &coeffs) throw () | |
| Detailed constructor. | |
| virtual | ~PiecewiseFunction () throw () |
| Destructor. | |
Assignment | |
| PiecewiseFunction & | operator= (const PiecewiseFunction &function) throw () |
| Assignemnt operator. | |
| void | clear () throw () |
| Clear function. | |
Accessors | |
| void | setIntervals (const std::vector< Interval > &intervals) throw () |
| Set the intervals for the piecewise definition. | |
| const std::vector< Interval > & | getIntervals () const throw () |
| 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 throw () |
| Return the range of the definition. | |
| void | setCoefficients (const vector< Coefficients > &coefficients) throw () |
| Set the coefficients. | |
| const std::vector< Coefficients > & | getCoefficients () const throw () |
| 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 throw () |
| compute the value of the piecewise function data for a given x | |
| void | set (const std::vector< Interval > &intervals, const std::vector< Coefficients > &coeffs) throw () |
Predicates | |
| bool | isInRange (double x) const throw () |
| Check whether a given x is in the range of definition. | |
| virtual bool | isValid () const throw () |
| check validity of the definition | |
| bool | operator== (const PiecewiseFunction &function) const throw () |
| Equality operator. | |
Debugging and Diagnostics | |
| virtual void | dump (std::ostream &s=std::cout, Size depth=0) const throw () |
| 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.
|
|
Set the coefficients. Note that this method does not check the vector of coefficients for sanity. |
|
|
Set the intervals for the piecewise definition. Note that this method does not check the definition of the intervals for sanity. |