SOBOL is a C++ library which computes elements of the Sobol quasirandom sequence.
A quasirandom or low discrepancy sequence, such as the Faure, Halton, Hammersley, Niederreiter or Sobol sequences, is "less random" than a pseudorandom number sequence, but more useful for such tasks as approximation of integrals in higher dimensions, and in global optimization. This is because low discrepancy sequences tend to sample space "more uniformly" than random numbers. Algorithms that use such sequences may have superior convergence.
SOBOL is an adapation of the INSOBL and GOSOBL routines in ACM TOMS Algorithm 647 and ACM TOMS Algorithm 659. The original code can only compute the "next" element of the sequence. The revised code allows the user to specify the index of any desired element.
A remark by Joe and Kuo shows how to extend the algorithm from the original maximum spatial dimension of 40 up to a maximum spatial dimension of 1111. These changes have been implemented in this version of the program. In particular, the extra data in the C++ version of the program was kindly formatted and supplied by Steffan Berridge.
The routines with a prefix of I8_ use 64 bit integers, and use the long int to get this. On some systems, a long int is simply 32 bits. In that case, try using the long long int datatype instead.
The original, true, correct versions of ACM TOMS Algorithm 647 and ACM TOMS Algorithm 659 are available in the TOMS subdirectory of the NETLIB web site. The version displayed here has been converted to FORTRAN90, and other internal changes have been made to suit me.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
CVT is a C++ library of routines for computing points in a Centroidal Voronoi Tessellation.
FAURE is a C++ library of routines for computing Faure sequences.
GRID is a C++ library of routines for computing points on a grid.
GSL is the Gnu Scientific Library which includes routines to compute elements of the Sobol sequence.
HALTON is a C++ library of routines for computing Halton sequences.
HAMMERSLEY is a C++ library of routines for computing Hammersley sequences.
HEX_GRID is a C++ library of routines for computing sets of points in a 2D hexagonal grid.
IHS is a C++ library of routines for computing improved Latin Hypercube datasets.
LATIN_CENTER is a C++ library of routines for computing Latin square data choosing the center value.
LATIN_EDGE is a C++ library of routines for computing Latin square data choosing the edge value.
LATIN_RANDOM is a C++ library of routines for computing Latin square data choosing a random value in the square.
NIEDERREITER2 is a C++ library of routines for computing Niederreiter sequences with base 2.
NORMAL is a C++ library which computes elements of a sequence of pseudorandom normally distributed values.
SOBOL is also available in a FORTRAN90 version and a MATLAB version.
SOBOL_OLD is a C++ library which implements the ACM TOMS algorithm, and is restricted to a maximal spatial dimension of 40.
TOMS647 is a FORTRAN90 version of ACM TOMS algorithm 647, for evaluating Faure, Halton and Sobol sequences.
TOMS659 is the FORTRAN77 source of ACM TOMS algorithm 659 for evaluating Sobol sequences.
UNIFORM is a C++ library of routines for computing uniform random values.
VAN_DER_CORPUT is a C++ library of routines for computing van der Corput sequences.
You can go up one level to the C++ source codes.