aboutsummaryrefslogtreecommitdiff
path: root/src/stable
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-11-27 17:42:41 +0000
committerMike Buland <eichlan@xagasoft.com>2012-11-27 17:42:41 +0000
commit223e2986ad7752d38ce24d1cbeff47db98df1ae3 (patch)
treeb771b61ac7ae960909c7f670baf70726f8ffe01a /src/stable
parent21df391dc6055884e621181cbc3b51d9ec2b095c (diff)
downloadlibbu++-223e2986ad7752d38ce24d1cbeff47db98df1ae3.tar.gz
libbu++-223e2986ad7752d38ce24d1cbeff47db98df1ae3.tar.bz2
libbu++-223e2986ad7752d38ce24d1cbeff47db98df1ae3.tar.xz
libbu++-223e2986ad7752d38ce24d1cbeff47db98df1ae3.zip
Added a few comments and fixed a string unit test, it assumed hex would be
upper case by default and now it's lower case.
Diffstat (limited to '')
-rw-r--r--src/stable/randombase.h9
-rw-r--r--src/stable/randomcmwc.h6
-rw-r--r--src/stable/randomsystem.h10
3 files changed, 25 insertions, 0 deletions
diff --git a/src/stable/randombase.h b/src/stable/randombase.h
index 946284f..953ccb8 100644
--- a/src/stable/randombase.h
+++ b/src/stable/randombase.h
@@ -11,6 +11,15 @@
11 11
12namespace Bu 12namespace Bu
13{ 13{
14 /**
15 * Base class for random number generators. This provides some basic
16 * implementations of standard helper functions. If your specific random
17 * number generator does not use the full range of a 32 bit integer then
18 * you'll want to override at least randNorm() to correct the range.
19 *
20 * Random number generators are not thread safe on their own. See
21 * Bu::Random.
22 */
14 class RandomBase 23 class RandomBase
15 { 24 {
16 public: 25 public:
diff --git a/src/stable/randomcmwc.h b/src/stable/randomcmwc.h
index 50eb8c4..2e0b0e8 100644
--- a/src/stable/randomcmwc.h
+++ b/src/stable/randomcmwc.h
@@ -11,6 +11,12 @@
11 11
12namespace Bu 12namespace Bu
13{ 13{
14 /**
15 * Complimentary Multiply With Carry random number generator. This is a
16 * simpler and faster generator than Mersenne Twister, but uses about as
17 * much memory. Many people think that it may be at least as good as
18 * Mersenne Twister, or better.
19 */
14 class RandomCmwc : public RandomBase 20 class RandomCmwc : public RandomBase
15 { 21 {
16 public: 22 public:
diff --git a/src/stable/randomsystem.h b/src/stable/randomsystem.h
index 63b40f3..6692e58 100644
--- a/src/stable/randomsystem.h
+++ b/src/stable/randomsystem.h
@@ -12,6 +12,16 @@
12namespace Bu 12namespace Bu
13{ 13{
14 class File; 14 class File;
15 /**
16 * Access to operating system provided random number generation. On linux
17 * this will provide access to /dev/random or /dev/urandom depending on
18 * weather Fast or Good is selected. On Linux systems Good random number
19 * generation can block while organic sources are use to gather entropy, so
20 * Fast is the default, it will always provide a result.
21 *
22 * On Windows this uses the Windows system cryptographic level random number
23 * generation services. Or at least, it will when I get to it. Sorry.
24 */
15 class RandomSystem : public RandomBase 25 class RandomSystem : public RandomBase
16 { 26 {
17 public: 27 public: