.DESLib.RandomLib.CMRG.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

Interface

function SetAntithetic
  input RngStream g "RngStream";
  input Integer a "Antithetic switch";
  output RngStream gout "Updated RngStream";
end SetAntithetic;

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