summaryrefslogtreecommitdiff
path: root/src/stable/randombasic.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stable/randombasic.h')
-rw-r--r--src/stable/randombasic.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/stable/randombasic.h b/src/stable/randombasic.h
index 4d1c2f8..c9b7072 100644
--- a/src/stable/randombasic.h
+++ b/src/stable/randombasic.h
@@ -11,10 +11,22 @@
11 11
12namespace Bu 12namespace Bu
13{ 13{
14 /**
15 * Basic Linear Congruential Generator. This is one of the simplest and
16 * most common pseudo-random number generators out there. It's simple,
17 * fast, and does a decent job if you don't have any stastistical
18 * requirements other than "random looking." This is the algorithm included
19 * as the default random number generator in most standard libraries,
20 * although this one uses larger numbers internally, has a longer period,
21 * and more even distrubition of randomness accross it's bits than most
22 * implementations.
23 *
24 * The base values were published by Donald Knuth.
25 */
14 class RandomBasic : public RandomBase 26 class RandomBasic : public RandomBase
15 { 27 {
16 public: 28 public:
17 RandomBasic(); 29 RandomBasic( int32_t iSeed=0 );
18 virtual ~RandomBasic(); 30 virtual ~RandomBasic();
19 31
20 virtual void seed( int32_t iSeed ); 32 virtual void seed( int32_t iSeed );
@@ -22,7 +34,7 @@ namespace Bu
22 virtual int32_t rand(); 34 virtual int32_t rand();
23 35
24 private: 36 private:
25 int64_t a, c, x; 37 int64_t x;
26 }; 38 };
27}; 39};
28 40