BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
piecewisePolynomial.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 // $Id: piecewisePolynomial.h,v 1.19 2005/12/23 17:01:48 amoll Exp $
5 //
6 
7 #ifndef BALL_MATHS_PPOLYNOMIAL_H
8 #define BALL_MATHS_PPOLYNOMIAL_H
9 
10 #ifndef BALL_MATHS_PIECEWISEFUNCTION_H
12 #endif
13 
14 namespace BALL
15 {
28  : public PiecewiseFunction
29  {
30  public:
31 
33 
34 
37 
41 
44  PiecewisePolynomial(const PiecewisePolynomial& polynomial) ;
45 
49  PiecewisePolynomial(Size degree, const std::vector<Interval>& intervals,
50  const std::vector<Coefficients>& coefficients) ;
51 
54  virtual ~PiecewisePolynomial();
55 
57 
60 
63  PiecewisePolynomial& operator = (const PiecewisePolynomial& poly);
64 
67  virtual void clear();
68 
70 
73 
76  void set(Size degree, const std::vector<Interval>& intervals, const std::vector<Coefficients>& coeffs);
77 
79  void setDegree(Size degree);
80 
82  Size getDegree() const;
83 
85  virtual double operator () (double x) const;
86 
88 
91 
94  bool operator == (const PiecewisePolynomial& poly) const;
95 
97 
100 
103  virtual void dump (std::ostream& s = std::cout, Size depth = 0) const;
104 
106 
107  protected:
108 
109  /*_ The degree of the polynomial
110  */
112 
113  };
114 
115 }
116 
117 #endif // BALL_MATHS_PPPOLYNOMIAL_H