Random Stream Source<TRandom>.Next Streams Method
Definition
Namespace: Numerics.NET.Random
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
Overload List
| Next | Returns an array of RNGs for the next N child streams and advances the index. |
| Next | Fills the specified span with the next child streams and advances the index. |
NextStreams(Int32)
Returns an array of RNGs for the next N child streams and advances the index.
public TRandom[] NextStreams(
int count
)Parameters
- count Int32
- The number of streams to generate.
Return Value
TRandom[]An array of count RNG instances.
Implements
IRandomStreamSource<TRandom>.NextStreams(Int32)Remarks
This method is equivalent to calling NextStream()count times, but may be more efficient due to internal optimizations.
The NextIndex is incremented by count.
Exceptions
| Argument | count is negative. |
NextStreams(Span<TRandom>)
Fills the specified span with the next child streams and advances the index.
public void NextStreams(
Span<TRandom> destination
)Parameters
Remarks
This method is equivalent to calling NextStream()destination.Length times. The NextIndex is incremented by destination.Length.