openModeller  Version 1.4.0
Random.hh
Go to the documentation of this file.
00001 
00030 #ifndef _RANDOMHH_
00031 #define _RANDOMHH_
00032 
00033 #include <openmodeller/os_specific.hh>
00034 #include <openmodeller/om_defs.hh>
00035 
00036 
00037 /********************************************************/
00038 /************************ Random ************************/
00039 
00044 class dllexp Random
00045 {
00046 public:
00047   Random();
00048 
00050   double get( double min, double max );
00052   double get( double max );
00054   double get()   { return random(); }
00055 
00056   double operator()( double min, double max );
00057   double operator()( double max );
00058   double operator()()  { return random(); }
00059 
00060 
00062   int get( int min, int max );
00064   int get( int max );
00065 
00066   int operator()( int min, int max );
00067   int operator()( int max );
00068 
00070   long get( long min, long max );
00072   long get( long max );
00073 
00074   long operator()( long min, long max );
00075   long operator()( long max );
00076 
00080   double discrete( float range, float dim_interv );
00081 
00082 
00083 private:
00084 
00086   double random();
00087 
00088   static int _initialized;
00089 };
00090 
00091 
00092 #endif
00093 
00094