.DESLib.RandomLib.CMRG.ResetStartStream

Information

ResetStartStream

Syntax

ResetStartStream(g)

Description

Reinitializes the state of the RngStream g to the initial state of the stream.

Examples

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

  // u = {0.463941,0.733693,0.00275546,
          0.196378,0.218283,0.34092,
          0.463941,0.733693,0.00275546}

Interface

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

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