pseudoRandom.h

Go to the documentation of this file.
00001 
00015 #ifndef _DLR_PSEUDORANDOM_H_
00016 #define _DLR_PSEUDORANDOM_H_
00017 
00018 #include <dlrCommon/types.h>
00019 
00020 namespace dlr {
00021 
00025   namespace random {
00026 
00030     class PseudoRandom {
00031     public:
00032 
00040       PseudoRandom();
00041 
00042 
00052       PseudoRandom(Int64 seed);
00053 
00054 
00058       ~PseudoRandom() {}
00059 
00060 
00074       double
00075       gaussian(double mu, double sigma);
00076 
00077 
00089       Int64
00090       getCurrentSeed();
00091 
00092     
00101       double
00102       normal();
00103 
00104 
00114       void
00115       setCurrentSeed(Int64 seed);
00116     
00117 
00133       double
00134       uniform(double lowerBound, double upperBound);
00135 
00136 
00152       int
00153       uniformInt(int lowerBound, int upperBound);
00154 
00155     private:
00156 
00173       void
00174       setLapackSeed(Int32 seed0, Int32 seed1, Int32 seed2, Int32 seed3);
00175 
00176     
00180       Int32 m_seed[4];
00181 
00182     }; // class PseudoRandom
00183 
00184   } // namespace random
00185 
00186 } // namespace dlr
00187 
00188 
00189 /* ======= Declarations to maintain compatibility with legacy code. ======= */
00190 
00191 namespace dlr {
00192 
00193   using random::PseudoRandom;
00194   
00195 } // namespace dlr
00196 
00197 
00198 #endif // #ifndef _DLR_PSEUDORANDOM_H_

Generated on Mon Jul 9 20:34:03 2007 for dlrLibs Utility Libraries by  doxygen 1.5.2