functionResetNextSubstream
ResetNextSubstream
Information
ResetNextSubstream
Syntax
ResetNextSubstream(g)
Description
Reinitializes the state of RngStream g to the beginning of the next sub-stream.
Examples
g2 := g1;
g2 := CMRG.ResetNextSubstream(g2);
for i in 1:3 loop
(u1[i],g1) := CMRG.RandU01(g1);
(u2[i],g2) := CMRG.RandU01(g2);
end for;
g1 := CMRG.ResetNextSubstream(g1);
for i in 4:6 loop
(u1[i],g1) := CMRG.RandU01(g1);
(u2[i],g2) := CMRG.RandU01(g2);
end for;
// u1 = {0.89111 ,0.941477,0.194141,
// 0.0368941,0.606502,0.597065}
// u2 = {0.0368941,0.606502,0.597065,
// 0.768019 ,0.628601,0.443735}
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| RngStream | g | RngStream |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| RngStream | gout | Updated RngStream |