Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | File Exchange
ATOMS : Low Discrepancy Sequences details
Login with GitLab

Low Discrepancy Sequences

Provides Halton, Sobol and other sequences.
(2906 downloads for this version - 34066 downloads for all versions)
A more recent valid version with binaries for Scilab 5.2 exists: 0.3
Michael Baudin
John Burkardt
Paul Bratley
Bennett Fox
Harald Niederreiter
Owner Organization
DIGITEO and others
Michael BAUDIN
Creation Date
March 25, 2011
Source created on
Scilab 5.2.x
Binaries available on
Scilab 5.2.x:
Linux 32-bit Windows 32-bit Windows 64-bit macOS Linux 64-bit
Install command
--> atomsInstall("lowdisc")

The goal of this toolbox is to provide a collection of low discrepancy
sequences. These random numbers are designed to be used in a Monte-Carlo
simulation. For example, low discrepancy sequences provide a higher
convergence rate to the Monte-Carlo method when used in numerical
integration. The toolbox takes into account the dimension of the problem, i.e.
generate vectors with arbitrary size.

The current prototype has the following features :
 * manage arbitrary number of dimensions,
 * skips a given number of elements in the sequence,
 * leaps (i.e. ignores) a given number of elements from call to call,
 * fast sequences based on compiled source code,
 * suggest optimal settings to use the best of the sequences,
 * object oriented programming.

Overview of sequences
 * The Halton sequence,
 * The Sobol sequence,
 * The Faure sequence,
 * The Reverse Halton sequence of Vandewoestyne and Cools,
 * The Niederreiter base 2 and arbitrary base sequence.
This component currently provides the following sequences:
 * "slow" sequences based on macros : Halton, Sobol, Faure, Reverse
Halton, Niederreiter base 2,
 * "fast" sequences based on C source code : Halton, Sobol, Faure,
Reverse Halton, Niederreiter in arbitrary base.

See the overview in the help provided with this toolbox.

The module provides the following help pages:
 * lowdisc_overview : An overview of the Low Discrepancy toolbox.
 * lowdisc_projections : An overview of bad 2D projections.

The flagship of this module is:
 * lowdisc_ldgen : Returns uniform numbers from a low discrepancy sequence.
 * lowdisc_cget : Returns the value associated with the given key.
 * lowdisc_configure : Configure a field of the object and returns the modified
 * lowdisc_destroy : Destroy the current object.
 * lowdisc_get : Quiery one not-configurable field.
 * lowdisc_new : Create a new object.
 * lowdisc_next : Returns the next term of the sequence
 * lowdisc_startup : Startup the sequence.
Macro Generators:
 * lowdisc_haltonnext : Returns the next element of the Halton sequence.
 * lowdisc_sobolnext : Generates a new quasirandom Sobol vector.
 * lowdisc_sobolskip : Skip elements in the Sobol sequence.
 * lowdisc_sobolstart : Initialize the Sobol sequence.
 * lowdisc_vandercorput : Returns the i-th term of the Van Der Corput sequence.
Static Functions:
 * lowdisc_fauresuggest : Returns favorable parameters for Faure sequences.
 * lowdisc_haltonsuggest : Returns favorable parameters for Halton sequence.
 * lowdisc_methods : Returns available sequences.
 * lowdisc_niederbase : Returns optimal base for Niederreiter sequence.
 * lowdisc_niedersuggest : Returns favorable parameters for Niederreiter
 * lowdisc_primes100 : Returns a matrix containing the 100 first primes.
 * lowdisc_primes1000 : Returns a matrix containing the 1000 first primes.
 * lowdisc_primes10000 : Returns a matrix containing the 10000 first primes.
 * lowdisc_sobolsuggest : Returns favorable parameters for Sobol sequences.
 * lowdisc_soboltau : Returns favorable starting seeds for Sobol sequences.
 * lowdisc_stopall : Stop all fast sequences.
Support Functions:
 * lowdisc_bary : Returns the digits of a number given the basis.
 * lowdisc_bitand : Bitwise AND.
 * lowdisc_bithi1 : Returns the position of the high one bit base 2 in an
 * lowdisc_bitlo0 : Returns the position of the low zero bit base 2 in an
 * lowdisc_bitor : bitwise OR
 * lowdisc_bitxor : Bitwise logical XOR operator.
 * lowdisc_corrcoef : Correlation coefficients
 * lowdisc_dec2bin : Convert a decimal floating point integer into binary.
 * lowdisc_proj2d : Plots 2 dimensional projections.


 * 2009-2011 - DIGITEO - Michael Baudin
 * 2008-2009 - INRIA - Michael Baudin
 * 2003-2009 - John Burkardt
 * 1994 - Paul Bratley, Bennett Fox, Harald Niederreiter
 * 1986-1988 - Bennett Fox


This toolbox is distributed under the GNU LGPL license.


Michael Baudin thanks John Burkardt for his help during 
the development of this library.
Thanks to Alan Cornet, Pierre Marechal for the technical help
for this project.
Thanks to Jean-Philippe Chancelier for finding bugs in the 
source code of the gateway.
Files (6)
[589.38 kB]
Source code archive

[852.60 kB]
Linux 32-bit binary for Scilab 5.2.x
Linux 32-bit
Automatically generated by the ATOMS compilation chain

[2.71 MB]
Windows 32-bit binary for Scilab 5.2.x
Windows 32-bit
Automatically generated by the ATOMS compilation chain

[2.76 MB]
Windows 64-bit binary for Scilab 5.2.x
Windows 64-bit
Automatically generated by the ATOMS compilation chain

[738.17 kB]
macOS binary for Scilab 5.2.x
MacOSX version
Automatically generated by the ATOMS compilation chain

[810.98 kB]
Linux 64-bit binary for Scilab 5.2.x
Linux 64-bit
Automatically generated by the ATOMS compilation chain

News (0)
Comments (3)     Leave a comment 
Comment -- April 7, 2011, 11:46:31 AM    
This is the change log for version 0.2.

lowdisc (0.2)
    * Fixed sobol_startup.
    * Improved the computation of Faure generator matrix (vectorization).
    * Created lowdisc_ldgen function to simplify the generation of sequences.
    * Updated the overview with a list of available sequences.
    * Separated Halton and Sobol sequences as stand-alons functions.
    * Created a separate .xml page for bad 2D projections.
    * Added "speed" field for ldbase, so that the speed of each sequence can be
    * Disabled optimization of source code for Sobol sequence.
	  This lead to failure to compile on some operating systems.
    * Updated tests to rely on assert module.
    * Fixed startup/shutdown of fast sequence in case of error.
    * Removed auto-generated demos for clarity.
Comment -- April 7, 2011, 11:46:51 AM    
All tests pass for v0.2 on Windows 32 bits.
Comment -- April 14, 2011, 01:44:56 PM    
Most tests pass for v0.2 on Linux 32 bits (only basic and ldfaure do not pass, because of a

portability issue of the test itself). All functions work well.
Leave a comment
You must register and log in before leaving a comment.
Login with GitLab
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.