functionSetAntithetic
SetAntithetic
Information
SetAntithetic
Change to antithetic generation mode.
Syntax
SetAntithetic(g,a)
Description
With a <> 0, the RngStream g will generate antithetic numbers (U-1 instead of U)
Examples
g2 := g1;
g2 := CMRG.SetAntithetic(g2,1);
u1 := CMRG.RandU01(g1);
u2 := CMRG.RandU01(g2);
// u1 = 0.37564
// u2 = 0.62436
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| RngStream | g | RngStream | |
| Integer | a | Antithetic switch |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| RngStream | gout | Updated RngStream |