Click or drag to resize

LeapfrogRandomStreams Class

Class LeapfrogRandomStreams creates several independent streams of random numbers using the method know as leapfrogging.
Inheritance Hierarchy

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 7.3
Syntax
public class LeapfrogRandomStreams : IndependentRandomStreams

The LeapfrogRandomStreams type exposes the following members.

Constructors
  NameDescription
Public methodLeapfrogRandomStreams(LeapfrogRandomStreams)
Creates a LeapfrogRandomStreams object which is a deep, independent copy.
Public methodLeapfrogRandomStreams(RandomNumberStreamBasicRandGenType, Int32, Int32)
Creates a LeapfrogRandomStreams object from the given parameters.
Public methodLeapfrogRandomStreams(Int32, RandomNumberStreamBasicRandGenType, Int32, Int32)
Creates a LeapfrogRandomStreams object from the given parameters.
Top
Properties
  NameDescription
Public propertyNumberOfStreams
Gets the number of independent streams.
(Inherited from IndependentRandomStreams.)
Public propertyStreamLength
The length of the independent streams.
(Inherited from IndependentRandomStreams.)
Top
Methods
  NameDescription
Public methodClone
Creates a deep, independent copy of self.
(Overrides IndependentRandomStreamsClone.)
Public methodDispose
Frees the stream data structure.
(Inherited from IndependentRandomStreams.)
Protected methodDispose(Boolean)
Frees the stream data structure.
(Inherited from IndependentRandomStreams.)
Public methodFill(IRandomNumberDistributionDouble, DoubleMatrix)
Fills the columns of a given matrix with independent random streams following the given probablility distribution.
(Inherited from IndependentRandomStreams.)
Public methodFill(IRandomNumberDistributionDouble, DoubleMatrix)
Fills the columns of a given matrix with independent random streams following the given probablility distributions.
(Inherited from IndependentRandomStreams.)
Public methodFill(IRandomNumberDistributionSingle, FloatMatrix)
Fills the columns of a given matrix with independent random streams following the given probablility distribution.
(Inherited from IndependentRandomStreams.)
Public methodFill(IRandomNumberDistributionSingle, FloatMatrix)
Fills the columns of a given matrix with independent random streams following the given probablility distributions.
(Inherited from IndependentRandomStreams.)
Public methodFillT(IRandomNumberDistributionT, T)
Fills an array of independent random number streams with random deiviats which follow the given probability distribution.
(Inherited from IndependentRandomStreams.)
Public methodFillT(IRandomNumberDistributionT, T)
Fills an array of independent random number streams with each stream following a given probability distribution.
(Inherited from IndependentRandomStreams.)
Protected methodFinalize
Frees the stream data structure.
(Inherited from IndependentRandomStreams.)
Public methodNext(IRandomNumberDistributionDouble)
Creates a matrix whose columns contain independent random number streams following the given probablility distibution.
(Inherited from IndependentRandomStreams.)
Public methodNext(IRandomNumberDistributionDouble)
Creates a matrix whose columns contain independent random number streams where each stream follows a specified probablility distibution.
(Inherited from IndependentRandomStreams.)
Public methodNext(IRandomNumberDistributionSingle)
Creates a matrix whose columns contain independent random number streams following the given probablility distibution.
(Inherited from IndependentRandomStreams.)
Public methodNext(IRandomNumberDistributionSingle)
Creates a matrix whose columns contain independent random number streams where each stream follows a specified probablility distibution.
(Inherited from IndependentRandomStreams.)
Public methodNextT(IRandomNumberDistributionT)
Returns an array of independent random number streams with the given distribution.
(Inherited from IndependentRandomStreams.)
Public methodNextT(IRandomNumberDistributionT)
Returns an array of random number streams, each with a a different specified distribution.
(Inherited from IndependentRandomStreams.)
Top
Fields
  NameDescription
Protected fielddisposed_
Flag indicating if the object is disposed.
(Inherited from IndependentRandomStreams.)
Protected fieldstreams_
Independent stream objects.
(Inherited from IndependentRandomStreams.)
Top
Remarks
The independent sequences are created by splitting the original sequence into k disjoint subsets, where k is the number of independent streams, is such a way that the first stream would generate the random numbers x1, xk+1, x2k+1, x3k+1,..., the second stream would generate the numbers x2, xk+2, x2k+2, x3k+2,..., and, finally, the kth stream would generate xk, x2k, x3k...

Leapfrog streams are only supported for basic random number generator types which provide a more efficient algorithm than generation of that full sequence to pick out a required subsequence. The static variable LeapfrogStream.SupportedGeneratorTypes contains a list of the supported types, which currently include:
RandomNumberStream.BasicRandGenType.MultiplicativeCongruent31,
RandomNumberStream.BasicRandGenType.MultipleCongruential59,
RandomNumberStream.BasicRandGenType.WinchannHillCombined.

See Also