MTToolBox  0.2.10
AbstractGenerator.hpp
Go to the documentation of this file.
1 #ifndef MTTOOLBOX_ABSTRACT_GENERATOR_HPP
2 #define MTTOOLBOX_ABSTRACT_GENERATOR_HPP
3 
34 namespace MTToolBox {
47  template<class U>
49  public:
50 
60  virtual ~AbstractGenerator() {}
61 
74  virtual U generate() = 0;
75 
103  virtual void seed(U value) = 0;
104 
124  virtual int bitSize() const = 0;
125  };
126 }
127 #endif //MTTOOLBOX_ABSTRACT_GENERATOR_HPP
pseudo random number generator.
Definition: AbstractGenerator.hpp:48
virtual ~AbstractGenerator()
Virtual destructor (always required)
Definition: AbstractGenerator.hpp:60
virtual int bitSize() const =0
Return bit size of internal state, i.e dimension of GF(2)-vector space.
virtual void seed(U value)=0
initialize internal state
virtual U generate()=0
transit current internal state to next state and output a pseudo random number.
name space for MTToolBox