#ifndef PiFunction_H #define PiFunction_H #include "Function.h" namespace functions { namespace oo { /** * This class implements the Function interface * for the 4 / (1 + x^2), which can be integrated * to compute pi (the integral over the region 0..1 * is arctan(1), which is approximately Pi/4. */ class PiFunction:public virtual functions::Function { public: PiFunction (); virtual double evaluate (double x); }; } } #endif // PiFunction_H