|
Nsound
0.9.4
|
#include <Nsound/RngTausworthe.h>

Public Member Functions | |
| RngTausworthe () | |
| Default seed used is the number of seconds from unix epoch. More... | |
| uint32 | get () |
| Get a random number. More... | |
| int32 | get (const Nsound::int32 min, const Nsound::int32 max) |
| Get a random float64 between min & max. More... | |
| float64 | get (const Nsound::float64 &min, const Nsound::float64 &max) |
| Get a random float64 between min & max. More... | |
| RngTausworthe & | operator= (const RngTausworthe &rhs) |
| assignment operator More... | |
| void | setSeed (Nsound::uint32 seed) |
| Set the seed to use. More... | |
Private Attributes | |
| Nsound::uint32 | s1_ |
| Nsound::uint32 | s2_ |
| Nsound::uint32 | s3_ |
An implementation of the Tausworthe random number algorithm found in the GNU Scientific Library.
Definition at line 45 of file RngTausworthe.h.
| RngTausworthe::RngTausworthe | ( | ) |
Default seed used is the number of seconds from unix epoch.
Definition at line 40 of file RngTausworthe.cc.
References setSeed().
|
virtual |
Get a random number.
Implements Nsound::RandomNumberGenerator.
Definition at line 51 of file RngTausworthe.cc.
References s1_, s2_, s3_, and TAUSWORTHE.
Referenced by Nsound::FilterIIR::designKernel(), main(), and Nsound::Kernel::randomize().
| int32 RngTausworthe::get | ( | const Nsound::int32 | min, |
| const Nsound::int32 | max | ||
| ) |
|
virtual |
Get a random float64 between min & max.
Implements Nsound::RandomNumberGenerator.
Definition at line 79 of file RngTausworthe.cc.
| RngTausworthe & RngTausworthe::operator= | ( | const RngTausworthe & | rhs | ) |
|
virtual |
Set the seed to use.
Implements Nsound::RandomNumberGenerator.
Definition at line 108 of file RngTausworthe.cc.
References LCG, s1_, s2_, and s3_.
Referenced by RngTausworthe().
|
private |
Definition at line 74 of file RngTausworthe.h.
Referenced by get(), operator=(), and setSeed().
|
private |
Definition at line 75 of file RngTausworthe.h.
Referenced by get(), operator=(), and setSeed().
|
private |
Definition at line 76 of file RngTausworthe.h.
Referenced by get(), operator=(), and setSeed().
1.8.6