Orthogonal Array Library
1.0.0
Libray for generating orthogonal arrays based on Art Owen's oa library
|
Marsaglia - Zaman universal random number generator. More...
#include <runif.h>
Public Member Functions | |
RUnif () | |
Constructor. | |
RUnif (int is, int js, int ks, int ls) | |
Constructor with individual seeds. | |
RUnif (SeedSet seedSet) | |
Constructor with a seed set. | |
void | seed (int is, int js, int ks, int ls) |
sets seed integers, rejects invalid input More... | |
void | seed (SeedSet seedSet) |
Set the seeds to equal the numbers in the seedSet. More... | |
SeedSet | getSeedSet () |
Get the seed set. More... | |
void | runif (std::vector< double > &x, int n) |
random uniform number generator More... | |
Static Public Member Functions | |
static int | mod (int a, int b) |
a mod b More... | |
Marsaglia - Zaman universal random number generator.
reinitialization: call seed(is,js,ks,ls), with integer arguments from 1 to 168, not all 1.
generate n uniform random numbers and store in x(n): call ranums(x,n).
Transliterated from FORTRAN to C by Art Owen, 4 March 1993.
SeedSet oacpp::RUnif::getSeedSet | ( | ) |
Get the seed set.
|
static |
a mod b
a | base |
b | modulus |
void oacpp::RUnif::runif | ( | std::vector< double > & | x, |
int | n | ||
) |
random uniform number generator
x | a double vector to contain the random numbers |
n | the length of the vector |
void oacpp::RUnif::seed | ( | int | is, |
int | js, | ||
int | ks, | ||
int | ls | ||
) |
sets seed integers, rejects invalid input
is | seed |
js | seed |
ks | seed |
ls | seed |
void oacpp::RUnif::seed | ( | SeedSet | seedSet | ) |
Set the seeds to equal the numbers in the seedSet.
seedSet | a set of four seeds |