5 #ifndef BALL_MATHS_PIECEWISEFUNCTION_H
6 #define BALL_MATHS_PIECEWISEFUNCTION_H
55 const std::vector<Coefficients>& coeffs) ;
83 void setIntervals(
const std::vector<Interval>& intervals) ;
87 const std::vector<Interval>& getIntervals()
const ;
92 const Interval& getInterval(
double x)
const;
102 Position getIntervalIndex(
double x)
const;
112 void setCoefficients(
const vector<Coefficients>& coefficients) ;
115 const std::vector<Coefficients>& getCoefficients()
const ;
129 virtual double operator () (
double x)
const;
132 void set(
const std::vector<Interval>& intervals,
133 const std::vector<Coefficients>& coeffs);
142 bool isInRange(
double x)
const;
146 virtual bool isValid()
const;
159 virtual void dump (std::ostream& s = std::cout,
Size depth = 0)
const;
184 void calculateRange();