Click or drag to resize

RandomNumberStream Class

Class RandomNumberStream is a vectorized random number generator which yields a stream of random numbers from various probability distributions.
Inheritance Hierarchy

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public class RandomNumberStream : ICloneable, 
	IDisposable

The RandomNumberStream type exposes the following members.

Constructors
 NameDescription
Public methodRandomNumberStream Constructs a RandomNumberStream object of the default type with a random seed.
Public methodRandomNumberStream(RandomNumberStreamBasicRandGenType) Constructs a RandomNumberStream object of the specified type with a random seed.
Protected methodRandomNumberStream(Boolean) Protected constructor for creating a RandomNumberStream object with null stream pointer.
Public methodRandomNumberStream(Int32) Constructs a RandomNumberStream object of the default type and given seed.
Protected methodRandomNumberStream(RandomNumberStream) Copy constructor. Resulting object is a deep copy of the given stream.
Public methodRandomNumberStream(Int32, RandomNumberStreamBasicRandGenType) Constructs a RandomNumberStream object with the given seed and type.
Top
Properties
 NameDescription
Public propertyRandGenType Gets the type.
Top
Methods
 NameDescription
Public methodClone Creates a deep copy of this generator.
Public methodDispose Frees the stream data structure.
Protected methodDispose(Boolean) Frees the stream data structure.
Public methodFillT(IRandomNumberDistributionT, T) Fills the given array with next random numbers from this stream.
Public methodFillT(IRandomNumberDistributionT, T, Int32, Int32) Fills the given array with next random numbers from this stream.
Protected methodFinalize Frees the stream data structure.
(Overrides ObjectFinalize)
Protected methodStatic memberGetErrorMessage Retrieve an error message for the given Enum value.
Public methodLoadStreamFromFile Sets this generators state to that stored in the given file using the SaveStreamToFile function.
Public methodNextT Fills a new array with next random numbers from this stream.
Public methodReset Resets the the generator to the given seed.
Public methodSaveStreamToFile Save this generators state to a file.
Top
Fields
 NameDescription
Public fieldStatic memberDEFAULT_BASIC_RNG The default uniform generator algorithm.
Protected fielddisposed_ Flag indicating if the object is disposed.
Protected fieldstream_ The MKL stream pointer.
Protected fieldtype_ The basic random generator type.
Top
Remarks
Unlike scalar-type generators whose output is a successive random number, vector generators produce a vector of n successive random numbers from a given distribution. Vector type random number generators will generally perform better than scalar ones because overhead expense of a function call are comparable to the total time required for computation.
See Also