NMath Reference Guide

## Sobol |

Class SobolQuasiRandomGenerator is quasi-random number generator which can be used
for generating sequences of quasi-random point in n-dimensional space.

Inheritance Hierarchy

SystemObject

CenterSpace.NMath.CoreQuasiRandomNumberGenerator

CenterSpace.NMath.CoreSobolQuasiRandomGenerator

CenterSpace.NMath.CoreQuasiRandomNumberGenerator

CenterSpace.NMath.CoreSobolQuasiRandomGenerator

Syntax

The SobolQuasiRandomGenerator type exposes the following members.

Constructors

Name | Description | |
---|---|---|

SobolQuasiRandomGenerator(Int32) | Constructs a SobolQuasiRandomGenerator for generating quasi-random points in n-dimensioal space. | |

SobolQuasiRandomGenerator(Int32, BitArray) | Constructs a SobolQuasiRandomGenerator for generating quasi-random points in n-dimensioal space. Uses the given set of primitive polynomials to initialize the generator. | |

SobolQuasiRandomGenerator(Int32, Int32) | Constructs a SobolQuasiRandomGenerator for generating quasi-random points in n-dimensioal space. The resulting generator is initialized with the given direction numbers. | |

SobolQuasiRandomGenerator(Int32, BitArray, Int32) | Constructs a SobolQuasiRandomGenerator for generating quasi-random points in n-dimensioal space. Uses the given set of primitive polynomials and directionto initialize numbers to initialize the generator. |

Properties

Name | Description | |
---|---|---|

Dimension |
Gets and sets the dimension.
(Inherited from QuasiRandomNumberGenerator) |

Methods

Name | Description | |
---|---|---|

CheckDimensionAndDirectionNumbers |
Verifies that the number of dimensions is positive and that the number of rows in the direction
numbers table is equal to the number of dimensions or one less than the number of dimensions.
(Overrides QuasiRandomNumberGeneratorCheckDimensionAndDirectionNumbers(Int32, Int32)) | |

CheckDimensionAndPolynomials |
Verifies that the dimension is positive and that the number of primitive
polynomials is equal to the number of dimenisons or one less than the
number of dimensions.
(Overrides QuasiRandomNumberGeneratorCheckDimensionAndPolynomials(Int32, BitArray)) | |

Clone |
Creates a deep copy of self.
(Overrides QuasiRandomNumberGeneratorClone) | |

Fill(DoubleMatrix) |
Fills the given double precision matrix with M.Cols quasirandom points. The
points are the columns of the matrix, hence the number of rows in the
given matrix must be equal to the Dimension. The quasirandom numbers
will follow a uniform distribution in the hypercube [0,1]^n, where n is
equal to Dimension.
(Inherited from QuasiRandomNumberGenerator) | |

Fill(FloatMatrix) |
Fills the given single precision matrix with M.Cols quasirandom points. The
points are the columns of the matrix, hence the number of rows in the
given matrix must be equal to the Dimension. The quasirandom numbers
will follow a uniform distribution in the hypercube [0,1]^n, where n is
equal to Dimension.
(Inherited from QuasiRandomNumberGenerator) | |

Fill(IRandomNumberDistributionDouble, DoubleMatrix) |
Fills the given double precision matrix with M.Cols quasirandom points. The
points are the columns of the matrix, hence the number of rows in the
given matrix must be equal to the Dimension. The quasirandom numbers
will follow the given distribution.
(Inherited from QuasiRandomNumberGenerator) | |

Fill(IRandomNumberDistributionSingle, FloatMatrix) |
Fills the given single precision matrix with M.Cols quasirandom points. The
points are the columns of the matrix, hence the number of rows in the
given matrix must be equal to the Dimension. The quasirandom numbers
will follow the given distribution.
(Inherited from QuasiRandomNumberGenerator) | |

Fill(DoubleMatrix, Double, Double) |
Fills the given double precision matrix with M.Cols quasirandom points. The
points are the columns of the matrix, hence the number of rows in the
given matrix must be equal to the Dimension. The quasirandom numbers
will follow a uniform distribution in the hypercube [a,b]^n, where n is
equal to Dimension.
(Inherited from QuasiRandomNumberGenerator) | |

Fill(FloatMatrix, Single, Single) |
Fills the given single precision matrix with M.Cols quasirandom points. The
points are the columns of the matrix, hence the number of rows in the
given matrix must be equal to the Dimension. The quasirandom numbers
will follow a uniform distribution in the hypercube [a,b]^n, where n is
equal to Dimension.
(Inherited from QuasiRandomNumberGenerator) | |

FillT(IRandomNumberDistributionT, T) |
Fills an array with quasirandom numbers from the specified
distribution. The quasirandom numbers, which are tuples of length
Dimension are layed out linearly in the array r.
If Dimension = n, then the first n-dimensional quasirandom
point occupies r[0], r[1],...,r[n-1], the second occupies
r[n], r[n+1],...,r[2n-1], and so on.
(Inherited from QuasiRandomNumberGenerator) | |

Next(IRandomNumberDistributionDouble, Int32) |
Creates a double precision matrix filled with quasirandom points which follow the given
probability distribution. The columns of the matrix are the points, and
hence the matrix will contain Dimension rows and numSamples
columns.
(Inherited from QuasiRandomNumberGenerator) | |

Next(IRandomNumberDistributionSingle, Int32) |
Creates a single precision matrix filled with quasirandom points which follow the given
probability distribution. The columns of the matrix are the points, and
hence the matrix will contain Dimension rows and numSamples
columns.
(Inherited from QuasiRandomNumberGenerator) | |

NextT(IRandomNumberDistributionT, Int32) |
Creates an array filled with quasirandom numbers from the specified
distribution. The quasirandom numbers, which are tuples of length
Dimension are layed out linearly in the array r.
If Dimension = n, then the first n-dimensional quasirandom
point occupies r[0], r[1],...,r[n-1], the second occupies
r[n], r[n+1],...,r[2n-1], and so on.
(Inherited from QuasiRandomNumberGenerator) |

Fields

Name | Description | |
---|---|---|

stream_ |
Basic random stream for uniform quasirandom numbers in n-dimensional
hypercube.
(Inherited from QuasiRandomNumberGenerator) |

Remarks

A quasi-random sequence is a sequence of n-tuples that fills n-dimensional space
more uniformly than uncorrelated random points.

Sobol is a 32-bit gray code-based quasirandom number generator defined by

Xn+1 = Xn @ Vcn

Un = Xn/pow(2 32)

where @ represents an exclusive or operation, the s-dimensional vectors Vi are the direction numbers,
ci is the index of the first 0 digit from the right in the binary representation of i,
and Un is the generator output nomalized to the unit hypercube (0,1)^s.

See Also