Random Stream Source<TRandom>.Branch And Advance Method
Creates a child stream source at the current next index and advances this source.
Definition
Namespace: Numerics.NET.Random
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
C#
A new stream source with path Path + [NextIndex] and the parent's index advanced.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0
public IRandomStreamSource<TRandom> BranchAndAdvance()Return Value
IRandomStreamSource<TRandom>A new stream source with path Path + [NextIndex] and the parent's index advanced.
Implements
IRandomStreamSource<TRandom>.BranchAndAdvance()Remarks
This method is equivalent to:
var child = Branch(NextIndex);
Advance(1);
return child;
Use this method for sequential branching where each child scope is consumed in order.