5 #ifndef BALL_MATHS_PIECEWISEFUNCTION_H
6 #define BALL_MATHS_PIECEWISEFUNCTION_H
8 #ifndef BALL_COMMON_LIMITS_H
61 const std::vector<Coefficients>& coeffs) ;
89 void setIntervals(
const std::vector<Interval>& intervals) ;
93 const std::vector<Interval>& getIntervals()
const ;
98 const Interval& getInterval(
double x)
const;
108 Position getIntervalIndex(
double x)
const;
118 void setCoefficients(
const vector<Coefficients>& coefficients) ;
121 const std::vector<Coefficients>& getCoefficients()
const ;
135 virtual double operator () (
double x)
const;
138 void set(
const std::vector<Interval>& intervals,
139 const std::vector<Coefficients>& coeffs);
148 bool isInRange(
double x)
const;
152 virtual bool isValid()
const;
165 virtual void dump (std::ostream& s = std::cout,
Size depth = 0)
const;
190 void calculateRange();