Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64226 - in sandbox/SOC/2010/quasi_random/libs/random: doc example
From: jvd_at_[hidden]
Date: 2010-07-21 13:13:47


Author: qrng
Date: 2010-07-21 13:13:46 EDT (Wed, 21 Jul 2010)
New Revision: 64226
URL: http://svn.boost.org/trac/boost/changeset/64226

Log:
Added a few sample pictures

Added:
   sandbox/SOC/2010/quasi_random/libs/random/doc/concepts.diff (contents, props changed)
   sandbox/SOC/2010/quasi_random/libs/random/doc/random.diff (contents, props changed)
   sandbox/SOC/2010/quasi_random/libs/random/example/out-faure.png (contents, props changed)
   sandbox/SOC/2010/quasi_random/libs/random/example/out-niederreiter_base2.png (contents, props changed)
   sandbox/SOC/2010/quasi_random/libs/random/example/out-sobol.png (contents, props changed)

Added: sandbox/SOC/2010/quasi_random/libs/random/doc/concepts.diff
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/quasi_random/libs/random/doc/concepts.diff 2010-07-21 13:13:46 EDT (Wed, 21 Jul 2010)
@@ -0,0 +1,52 @@
+--- concepts.bak 2010-03-30 21:23:27.000000000 +0300
++++ concepts.qbk 2010-03-31 21:13:50.000000000 +0300
+@@ -238,6 +238,49 @@
+
+ [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. The intuitive idea is that a low discrepancy
++sequence is more evenly distributed than a pseudo random sequence would be.
++For example, if we generate a low discrepancy sequence of 2D points on a square,
++this square would be covered more evenly, and 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

Added: sandbox/SOC/2010/quasi_random/libs/random/doc/random.diff
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/quasi_random/libs/random/doc/random.diff 2010-07-21 13:13:46 EDT (Wed, 21 Jul 2010)
@@ -0,0 +1,26 @@
+--- random.bak 2010-03-30 21:23:27.000000000 +0300
++++ random.qbk 2010-03-31 18:07:37.000000000 +0300
+@@ -13,12 +13,15 @@
+ [template sup[text]'''<superscript>'''[text]'''</superscript>''']
+
+ [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]]

Added: sandbox/SOC/2010/quasi_random/libs/random/example/out-faure.png
==============================================================================
Binary file. No diff available.

Added: sandbox/SOC/2010/quasi_random/libs/random/example/out-niederreiter_base2.png
==============================================================================
Binary file. No diff available.

Added: sandbox/SOC/2010/quasi_random/libs/random/example/out-sobol.png
==============================================================================
Binary file. No diff available.


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk