SetSeed(g,seed)
Changes the initial seed of the RngStream g. This modificatioin also changes the current state of the RngStream.
g2 := g1; for i in 1:3 loop (u1[i],g1) := CMRG.RandU01(g1); (u2[i],g2) := CMRG.RandU01(g2); end for; g2 := CMRG.SetSeed(g2,{2345,2435,2345,2345,2345,2345}); for i in 4:6 loop (u1[i],g1) := CMRG.RandU01(g1); (u2[i],g2) := CMRG.RandU01(g2); end for; // u1 = {0.586819,0.848015,0.494309,0.609745,0.698027,0.812434} // u2 = {0.586819,0.848015,0.494309,0.813362,0.517802,0.947542}
function SetSeed input RngStream g "RngStream"; input Src.Seed seed "New seed"; output RngStream gout "Updated RngStream"; output Integer out "result (0 == success)"; end SetSeed;