#ifndef MonteCarloIntegrator_H #define MonteCarloIntegrator_H #include "oo/Integrator.h" #include "oo/RandomGenerator.h" #include "oo/Function.h" namespace integrators { namespace oo { /** * A class that implements the Ingrator interface * using the Monte Carlo integration technique. */ class MonteCarloIntegrator:public virtual integrators::Integrator { public: MonteCarloIntegrator (); virtual void setFunction (functions::Function * function_to_integrate); virtual void setRandomGenerator (randomgen::RandomGenerator * randomGen); virtual double integrate (double lowBound, double upBound, int count); private: functions::Function * function_m; randomgen::RandomGenerator * random_m; }; } } #endif // MonteCarloIntegrator_H