functionResetStartSubstream
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}
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| RngStream | g | RngStream |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| RngStream | gout | Updated RngStream |