.Modelica_Noise.Math.Random.Generators.Xorshift1024star.random

Information

Syntax

(r, stateOut) = Xorshift128plus.random(stateIn);

Description

Returns a uniform random number in the range 0 < random ≤ 1 with the xorshift1024* algorithm. Input argument stateIn is the state vector of the previous call. Output argument stateOut is the updated state vector. If the function is called with identical stateIn vectors, exactly the same random number r is returned.

Example

  parameter Integer localSeed;
  parameter Integer globalSeed;
  Real r;
  Integer state[Xorshift1024star.nState];
initial equation
  state = initialState(localSeed, globalSeed);
equation
  when sample(0,0.1) then
    (r, state) = random(pre(state));
  end when;

See also

Random.Generators.Xorshift1024star.initialState.

Interface

function random
  extends Interfaces.random(final stateSize = Xorshift1024star.nState);
end random;

Revisions

Date Description
June 22, 2015
Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
DLR Institute of System Dynamics and Control


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