RandomStreamTree<TRandom>.PrefixStream Method

Returns an RNG corresponding to the current path prefix only.

Definition

Namespace: Numerics.NET.Random
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
C#
public override TRandom PrefixStream()

Return Value

TRandom
An RNG instance initialized for the current path.

Implements

IRandomStreamSource<TRandom>.PrefixStream()

Remarks

This method returns an RNG that represents the current scope without consuming or advancing the next index. Multiple calls to PrefixStream() return independent RNG instances with identical initial state.

Unlike NextStream(), this method does not advance NextIndex.

See Also