#include <ccisaac.h>
Collaboration diagram for QTIsaac< ALPHA, T >:

Public Types | |
| typedef unsigned char | byte |
| enum | { N = (1<<ALPHA) } |
Public Member Functions | |
| QTIsaac () | |
| QTIsaac (T a, T b=0, T c=0) | |
| virtual | ~QTIsaac (void) |
| T | rand (void) |
| T | nrand (T n) |
| Returns a T between 0 and n-1, inclusive. This function assures that all returns are evenly distributed over the range [0, n-1], regardless of the value of n and the range of T. | |
| double | drand (void) |
| Returns a double (floating point number) in the range [0.0, 1.0]. | |
| virtual void | randinit (randctx *ctx, bool bUseSeed) |
| virtual void | srand (T a=0, T b=0, T c=0, T *s=NULL) |
Public Attributes | |
| T | ls_a |
| T | ls_b |
| T | ls_c |
| Last seeds (to query later). | |
Protected Member Functions | |
| virtual void | isaac (randctx *ctx) |
| T | ind (T *mm, T x) |
| void | rngstep (T mix, T &a, T &b, T *&mm, T *&m, T *&m2, T *&r, T &x, T &y) |
| virtual void | shuffle (T &a, T &b, T &c, T &d, T &e, T &f, T &g, T &h) |
Private Attributes | |
| randctx | m_rc |
Ported from vanilla C to to template C++ class by Quinn Tyler Jackson on 16-23 July 1998. <quinn@qtj.net>
The function for the expected period of this random number generator, according to Jenkins is: f(a,b) = 2**((a+b*(3+2^^a)-1)
(where a is ALPHA and b is bitwidth)
So, for a bitwidth of 32 and an ALPHA of 8, the expected period of ISAAC is:
Jackson has been able to run implementations with an ALPHA as high as 16, or
doxygen comments by Trent Apted
| ALPHA | the 'randomness' of the generator (see above) |
| T | the type used -- should be an unsigned integral type |
Definition at line 44 of file ccisaac.h.
|
|||||
|
Definition at line 46 of file ccisaac.h. Referenced by QTIsaac< ALPHA, T >::ind(). |
|
|||||
|
|
|
|||||||||
|
Definition at line 108 of file ccisaac.h. References QTIsaac< ALPHA, T >::srand(). |
Here is the call graph for this function:

|
||||||||||||||||||||
|
Definition at line 115 of file ccisaac.h. References QTIsaac< ALPHA, T >::srand(). |
Here is the call graph for this function:

|
||||||||||
|
|
|
||||||||||
|
Returns a double (floating point number) in the range [0.0, 1.0]. The values will be evenly distributed, but the number of discrete values is limited to sizeof(T).
Definition at line 143 of file ccisaac.h. References QTIsaac< ALPHA, T >::rand(). |
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 217 of file ccisaac.h. References QTIsaac< ALPHA, T >::byte, and QTIsaac< ALPHA, T >::N. Referenced by QTIsaac< ALPHA, T >::rngstep(). |
|
||||||||||
|
Definition at line 257 of file ccisaac.h. References QTIsaac< ALPHA, T >::N, QTIsaac< ALPHA, T >::randctx::randa, QTIsaac< ALPHA, T >::randctx::randb, QTIsaac< ALPHA, T >::randctx::randc, QTIsaac< ALPHA, T >::randctx::randmem, QTIsaac< ALPHA, T >::randctx::randrsl, and QTIsaac< ALPHA, T >::rngstep(). Referenced by QTIsaac< ALPHA, T >::rand(), and QTIsaac< ALPHA, T >::randinit(). |
Here is the call graph for this function:

|
||||||||||
|
Returns a T between 0 and n-1, inclusive.
Definition at line 148 of file ccisaac.h. References QTIsaac< ALPHA, T >::rand(). |
Here is the call graph for this function:

|
||||||||||
|
Definition at line 138 of file ccisaac.h. References QTIsaac< ALPHA, T >::isaac(), QTIsaac< ALPHA, T >::m_rc, QTIsaac< ALPHA, T >::N, QTIsaac< ALPHA, T >::randctx::randcnt, and QTIsaac< ALPHA, T >::randctx::randrsl. Referenced by QTIsaac< ALPHA, T >::drand(), and QTIsaac< ALPHA, T >::nrand(). |
Here is the call graph for this function:

|
||||||||||||||||
Here is the call graph for this function:

|
||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 226 of file ccisaac.h. References QTIsaac< ALPHA, T >::ind(). Referenced by QTIsaac< ALPHA, T >::isaac(). |
Here is the call graph for this function:

|
||||||||||||||||||||||||||||||||||||||||
|
Definition at line 234 of file ccisaac.h. Referenced by QTIsaac< ALPHA, T >::randinit(). |
|
||||||||||||||||||||||||
Here is the call graph for this function:

|
|||||
|
Definition at line 92 of file ccisaac.h. Referenced by QTIsaac< ALPHA, T >::srand(). |
|
|||||
|
Definition at line 92 of file ccisaac.h. Referenced by QTIsaac< ALPHA, T >::srand(). |
|
|||||
|
Last seeds (to query later).
Definition at line 92 of file ccisaac.h. Referenced by QTIsaac< ALPHA, T >::srand(). |
|
|||||
|
Definition at line 104 of file ccisaac.h. Referenced by QTIsaac< ALPHA, T >::rand(), and QTIsaac< ALPHA, T >::srand(). |
1.3.4