1 #ifndef PIECEWISELINEARFUNCTION_H
3 #define PIECEWISELINEARFUNCTION_H
13 class PieceWiseLinearFunction :
public Function
16 PieceWiseLinearFunction(
const std::vector<Point2D> &points,
17 double leftValue = std::numeric_limits<double>::quiet_NaN(),
18 double rightValue = std::numeric_limits<double>::quiet_NaN());
19 ~PieceWiseLinearFunction();
21 double evaluate(
double x);
23 double getLeftValue()
const {
return m_leftValue; }
24 double getRightValue()
const {
return m_rightValue; }
25 const std::vector<Point2D> &getPoints()
const {
return m_points; }
27 std::vector<Point2D> m_points;
32 #endif // PIECEWISELINEARFUNCTION_H