#include <discrep.h>
Inheritance diagram for generators::DISCREP:

Public Member Functions | |
| DISCREP (unsigned int dim) | |
| Base constructor. | |
| virtual | ~DISCREP () |
| Base deconstructor. | |
| virtual void | nextVector (double *x) |
| Generate d new coordinates (= 1 point). | |
| virtual void | setSeed (double *x, unsigned int s) |
| Initialises the discrepancy sampler. | |
Protected Attributes | |
| int | pa [MAX_DIM][COORD_DIGITS] |
| Coefficients a_{i,k} for each P_i^k. | |
| double | pip [MAX_DIM][COORD_DIGITS] |
| Cache prime inverse powers: P_i^{-k-1}. | |
Static Protected Attributes | |
| int | primes [MAX_DIM] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131} |
| A list of pre-defined prime numbers. | |
Discrepancy sampling uses prime base expansion of point indices to obtain properly distributed points in
.
|
|
Base constructor. Simply calls RVG's constructor.
|
|
|
Generate d new coordinates (= 1 point). Make sure to have called setSeed(double*, int) at least once before.
Implements generators::RVG. |
|
||||||||||||
|
Initialises the discrepancy sampler. Since this sampler calculates points based on the previously generated point, x has to be supplied to the seeding function. Note that the state of the RNG *partially* is stored in the vector x!
|
1.3.9.1