UniformRNG.h

Go to the documentation of this file.
00001 #ifndef CUNIFORMRNG_H
00002 #define CUNIFORMRNG_H
00003 
00004 #include "GeneralRNG.h"
00005 #include <boost/random/lagged_fibonacci.hpp>
00006 #include <boost/random/uniform_01.hpp>
00007 #include <boost/random/variate_generator.hpp>
00008 
00009 //! Generate uniformly distributed random numbers, this is basically a wrapper for the boost random number generators, that is a little easier to use
00010 class UniformRNG : public GeneralRNG
00011   {
00012 private:
00013   boost::lagged_fibonacci607 generator;
00014   boost::uniform_01<boost::lagged_fibonacci607> real_dist;
00015   //boost::variate_generator<boost::lagged_fibonacci607&, boost::uniform_01 > real_rand;
00016 public:
00017   //! return float between low and high
00018   float GetNumber(const float low, const float high);
00019   // returns float between 0 and 1 
00020   virtual float GetNumber();
00021   // return integer between 0 and max-1
00022   virtual unsigned int GetNumber(const unsigned int max);
00023   UniformRNG();
00024   virtual ~UniformRNG();
00025   };
00026 
00027 #endif // CUNIFORMRNG_H

Generated on Fri Jul 4 15:30:21 2008 for GPLIB++ by  doxygen 1.5.5