#ifndef _CHEBYSHEV_H
#define _CHEBYSHEV_H

/*
CLASS 
Chebyshev

DESCRIPTION
Provide Chebyshev polynomial approximation to arbitrary function of 
following prototype:

   double func(double x);

E.g., you can approximate sin(), cos(), etc.

AUTHOR
Tom O'Reilly
*/
class Chebyshev {

public:

  Chebyshev(double lower, double upper, int nCoeffs, double (*func)(double ));

  ~Chebyshev();

  double evaluate(double x);

protected:

  // Range of approximation
  double _lower;
  double _upper;
  double _range;

  int _nCoeffs;
  double *_coeffs;
};

#endif
