ECF 1.5
Randomizer.h
1#ifndef Randomizer_h
2#define Randomizer_h
3
4class State;
5typedef boost::shared_ptr<State> StateP;
6
12{
13public:
14 Randomizer() {}
15
16 virtual ~Randomizer() {}
17
19 virtual int getRandomInteger(int p, int q) = 0;
20
22 virtual int getRandomInteger(uint p) = 0;
23
25 virtual double getRandomDouble() = 0;
26
27 virtual void registerParameters(StateP s) {}
28
29 virtual bool initialize(StateP s)
30 { return true; }
31};
32
33typedef boost::shared_ptr<Randomizer> RandomizerP;
34
35#endif
36
Abstract Randomizer class.
Definition: Randomizer.h:12
virtual int getRandomInteger(int p, int q)=0
Returns random integer in [p, q].
virtual int getRandomInteger(uint p)=0
Returns radnom integer in [0, p - 1].
virtual double getRandomDouble()=0
Returns random double.
State class - backbone of the framework.
Definition: State.h:39