Index: concepts.qbk =================================================================== --- concepts.qbk (revision 61162) +++ concepts.qbk (working copy) @@ -238,6 +238,50 @@ [endsect] +[section Quasi-Random Number Generator] + +A quasi-random number generator is a __PseudoRandomNumberGenerator which +provides a deterministic sequence of quasi-random numbers, based on some +algorithm and internal state. [classref boost::random::niederreiter_base2 +Niederreiter Base 2] generator is an example of such a [qrng quasi-random +number generator]. The "quasi" modifier is used to denote more clearly that the +values produced by such a generator are neither random nor pseudo-random, but +they form a low discrepancy sequence. Intuitively, a low discrepancy +sequence is more evenly distributed than a truly random sequence would be. +For example, if we generate a low discrepancy sequence of 2D points on a +square, the number of points falling to any part of the square would be +proportional to the number of points in the whole square. +Such sequences share some properties of random variables and in certain +applications such as the quasi-Monte Carlo method their lower discrepancy +is an important advantage. + +[note Quasi-random sequences are known to give efficient numerical integration +rules in many Bayesian statistical problems where the posterior distribution +can be transformed into periodic functions on the n-dimensional hypercube.] + +Harold Niederreiter gives an extensive overview on random number generation +and quasi-Monte Carlo methods in his book "Random number generation and +quasi-Monte Carlo methods, Society for Industrial and Applied Mathematics, 1992". + +In addition to the __PseudoRandomNumberGenerator requirements, +a quasi-random number generator has some additional requirements. In the +following table, `X` denotes a quasi-random number generator class, and `v` is +a const value of `X`. + +[table QuasiRandomNumberGenerator requirements + [[expression] [return type] [pre/post-condition]] + [[`X::dimension()`] [std::size_t] [the dimension of quasi-random domain. It must be no less than 1. + The return value of this function shall not change during the lifetime of the object.]] + ] + +[note The `operator()` returns a successive element of an n-dimensional (n = `X::dimension`) vector +at each invocation. When all elements are exhausted, `operator()` begins anew with the starting +element of a subsequent n-dimensional vector.] + +The class __niederreiter_base2 is a model for a quasi-random number generator. + +[endsect] + [section Random Distribution] A random distribution produces random numbers distributed according to some Index: random.qbk =================================================================== --- random.qbk (revision 61162) +++ random.qbk (working copy) @@ -13,12 +13,15 @@ [template sup[text]''''''[text]''''''] [template prng[text] [link boost_random.reference.concepts.pseudo_random_number_generator [text]]] +[template qrng[text] [link boost_random.reference.concepts.quasi_random_number_generator [text]]] [template concepts[text] [link boost_random.reference.concepts [text]]] [template generators[text] [link boost_random.reference.generators [text]]] [template distributions[text] [link boost_random.reference.distributions [text]]] [def __NumberGenerator [link boost_random.reference.concepts.number_generator NumberGenerator]] [def __UniformRandomNumberGenerator [link boost_random.reference.concepts.uniform_random_number_generator UniformRandomNumberGenerator]] +[def __PseudoRandomNumberGenerator [link boost_random.reference.concepts.pseudo_random_number_generator PseudoRandomNumberGenerator]] +[def __QuasiRandomNumberGenerator [link boost_random.reference.concepts.quasi_random_number_generator QuasiRandomNumberGenerator]] [def __CopyConstructible [@boost:/doc/html/CopyConstructible.html CopyConstructible]] [def __Assignable [@boost:/doc/html/Assignable.html Assignable]] @@ -39,6 +42,7 @@ [def __hellekalek1995 [classref boost::hellekalek1995 hellekalek1995]] [def __mt11213b [classref boost::mt11213b mt11213b]] [def __mt19937 [classref boost::mt19937 mt19937]] +[def __niederreiter_base2 [classref boost::random::niederreiter_base2 niederreiter_base2]] [def __lagged_fibonacci607 [classref boost::lagged_fibonacci607 lagged_fibonacci607]] [def __lagged_fibonacci1279 [classref boost::lagged_fibonacci1279 lagged_fibonacci1279]] [def __lagged_fibonacci2281 [classref boost::lagged_fibonacci2281 lagged_fibonacci2281]] Index: Jamfile.v2 =================================================================== --- Jamfile.v2 (revision 61162) +++ Jamfile.v2 (working copy) @@ -29,6 +29,7 @@ linear_feedback_shift lognormal_distribution mersenne_twister + niederreiter_base2 normal_distribution poisson_distribution random_number_generator