.DESLib.RandomLib.CMRG.ResetStartSubstream

Information

ResetStartSubstream

Syntax

ResetStartSubstream(g)

Description

Reinitializes the state of RngStream g to the beginning of the current sub-stream.

Examples

    for i in 1:3 loop
      (u[i],g) := CMRG.RandU01(g);
    end for;
    g := CMRG.ResetStartSubstream(g);
    for i in 4:6 loop
      (u[i],g) := CMRG.RandU01(g);
    end for;

  // u = {0.584045,0.18949,0.698993,
  //      0.584045,0.18949,0.698993}

Interface

function ResetStartSubstream
  input RngStream g "RngStream";
  output RngStream gout "Updated RngStream";
end ResetStartSubstream;

Generated at 2024-11-24T19:25:44Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos