NMath Reference Guide

## Leapfrog |

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

Inheritance Hierarchy

SystemObject

CenterSpace.NMath.CoreIndependentRandomStreams

CenterSpace.NMath.CoreLeapfrogRandomStreams

CenterSpace.NMath.CoreIndependentRandomStreams

CenterSpace.NMath.CoreLeapfrogRandomStreams

Syntax

The LeapfrogRandomStreams type exposes the following members.

Constructors

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

LeapfrogRandomStreams(LeapfrogRandomStreams) | Creates a LeapfrogRandomStreams object which is a deep, independent copy. | |

LeapfrogRandomStreams(RandomNumberStreamBasicRandGenType, Int32, Int32) | Creates a LeapfrogRandomStreams object from the given parameters. | |

LeapfrogRandomStreams(Int32, RandomNumberStreamBasicRandGenType, Int32, Int32) | Creates a LeapfrogRandomStreams object from the given parameters. |

Properties

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

NumberOfStreams |
Gets the number of independent streams.
(Inherited from IndependentRandomStreams) | |

StreamLength |
The length of the independent streams.
(Inherited from IndependentRandomStreams) |

Methods

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

Clone |
Creates a deep, independent copy of self.
(Overrides IndependentRandomStreamsClone) | |

Dispose |
Frees the stream data structure.
(Inherited from IndependentRandomStreams) | |

Dispose(Boolean) |
Frees the stream data structure.
(Inherited from IndependentRandomStreams) | |

Fill(IRandomNumberDistributionDouble, DoubleMatrix) |
Fills the columns of a given matrix with independent random streams following
the given probablility distribution.
(Inherited from IndependentRandomStreams) | |

Fill(IRandomNumberDistributionDouble, DoubleMatrix) |
Fills the columns of a given matrix with independent random streams following
the given probablility distributions.
(Inherited from IndependentRandomStreams) | |

Fill(IRandomNumberDistributionSingle, FloatMatrix) |
Fills the columns of a given matrix with independent random streams following
the given probablility distribution.
(Inherited from IndependentRandomStreams) | |

Fill(IRandomNumberDistributionSingle, FloatMatrix) |
Fills the columns of a given matrix with independent random streams following
the given probablility distributions.
(Inherited from IndependentRandomStreams) | |

FillT(IRandomNumberDistributionT, T) |
Fills an array of independent random number streams with random deiviats
which follow the given probability distribution.
(Inherited from IndependentRandomStreams) | |

FillT(IRandomNumberDistributionT, T) |
Fills an array of independent random number streams with each stream following
a given probability distribution.
(Inherited from IndependentRandomStreams) | |

Finalize |
Frees the stream data structure.
(Inherited from IndependentRandomStreams) | |

Next(IRandomNumberDistributionDouble) |
Creates a matrix whose columns contain independent random number streams
following the given probablility distibution.
(Inherited from IndependentRandomStreams) | |

Next(IRandomNumberDistributionDouble) |
Creates a matrix whose columns contain independent random number streams
where each stream follows a specified probablility distibution.
(Inherited from IndependentRandomStreams) | |

Next(IRandomNumberDistributionSingle) |
Creates a matrix whose columns contain independent random number streams
following the given probablility distibution.
(Inherited from IndependentRandomStreams) | |

Next(IRandomNumberDistributionSingle) |
Creates a matrix whose columns contain independent random number streams
where each stream follows a specified probablility distibution.
(Inherited from IndependentRandomStreams) | |

NextT(IRandomNumberDistributionT) |
Returns an array of independent random number streams with the given
distribution.
(Inherited from IndependentRandomStreams) | |

NextT(IRandomNumberDistributionT) |
Returns an array of random number streams, each with a
a different specified distribution.
(Inherited from IndependentRandomStreams) |

Fields

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

disposed_ |
Flag indicating if the object is disposed.
(Inherited from IndependentRandomStreams) | |

streams_ |
Independent stream objects.
(Inherited from IndependentRandomStreams) |

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