Click or drag to resize

SobolQuasiRandomGenerator Class

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

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public class SobolQuasiRandomGenerator : QuasiRandomNumberGenerator

The SobolQuasiRandomGenerator type exposes the following members.

Constructors
 NameDescription
Public methodSobolQuasiRandomGenerator(Int32) Constructs a SobolQuasiRandomGenerator for generating quasi-random points in n-dimensioal space.
Public methodSobolQuasiRandomGenerator(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.
Public methodSobolQuasiRandomGenerator(Int32, Int32) Constructs a SobolQuasiRandomGenerator for generating quasi-random points in n-dimensioal space. The resulting generator is initialized with the given direction numbers.
Public methodSobolQuasiRandomGenerator(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.
Top
Properties
 NameDescription
Public propertyDimension Gets and sets the dimension.
(Inherited from QuasiRandomNumberGenerator)
Top
Methods
 NameDescription
Protected methodCheckDimensionAndDirectionNumbers 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))
Protected methodCheckDimensionAndPolynomials 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))
Public methodClone Creates a deep copy of self.
(Overrides QuasiRandomNumberGeneratorClone)
Public methodFill(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)
Public methodFill(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)
Public methodFill(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)
Public methodFill(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)
Public methodFill(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)
Public methodFill(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)
Public methodFillT(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)
Public methodNext(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)
Public methodNext(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)
Public methodNextT(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)
Top
Fields
 NameDescription
Protected fieldstream_ Basic random stream for uniform quasirandom numbers in n-dimensional hypercube.
(Inherited from QuasiRandomNumberGenerator)
Top
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