.Modelica_Noise.Math.Random.Utilities.impureRandomInteger

Information

Syntax

r = impureRandomInteger(id, imin=1, imax=Modelica.Constants.Integer_inf);

Description

Returns an Integer random number in the range imin ≤ random ≤ imax with the xorshift1024* algorithm, (the random number in the range 0 ... 1 returned by the xorshift1024* algorithm is mapped to an Integer number in the range imin ... imax). The dummy input Integer argument id must be the output argument of a call to function initializeImpureRandom, in order that the sorting order is correct (so that impureRandomInteger is always called after initializeImpureRandom). For every call of impureRandomInteger(id), a different random number is returned, so the function is impure.

See also

initializeImpureRandom, Random.Generators

Note

This function is impure!

Interface

function impureRandomInteger
  input Integer id "Identification number from initializeImpureRandom(..) function (is needed for correct sorting)";
  input Integer imin = 1 "Minimum integer to generate";
  input Integer imax = Modelica.Constants.Integer_inf "Maximum integer to generate";
  output Integer y "A random number with a uniform distribution on the interval [imin,imax]";
end impureRandomInteger;

Generated at 2024-12-28T19:26:00Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos