Random Stream Source<TRandom>.Next Stream Method
Returns an RNG for the next child stream and advances the index.
Definition
Namespace: Numerics.NET.Random
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
C#
An RNG instance initialized for path Path + [NextIndex].
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
public abstract TRandom NextStream()Return Value
TRandomAn RNG instance initialized for path Path + [NextIndex].
Implements
IRandomStreamSource<TRandom>.NextStream()Remarks
This method returns an RNG for the current next index, then increments NextIndex by 1. Each call produces a distinct stream.
This is equivalent to:
var index = NextIndex;
var child = Branch(index);
Advance(1);
return child.PrefixStream();
but is typically more efficient.