initialState

Returns an initial state for the xorshift1024* algorithm

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Syntax

state = Xorshift1024star.initialState(localSeed, globalSeed);

Description

Generates an initial state vector for the Xorshift1024star random number generator (= xorshift1024* algorithm), from two Integer numbers given as input (arguments localSeed, globalSeed). Any Integer numbers can be given (including zero or negative number). The function returns a reasonable initial state vector with the following strategy:

The Xorshift64star random number generator is used to fill the internal state vector with 64 bit random numbers.

Example

  parameter Integer localSeed;
  parameter Integer globalSeed;
  Integer state[Xorshift1024star.nState];
initial equation
  state = initialState(localSeed, globalSeed);

See also

Random.Generators.Xorshift1024star.random.

Syntax

state = initialState(localSeed, globalSeed)

Inputs (2)

localSeed

Type: Integer

Description: The local seed to be used for generating initial states

globalSeed

Type: Integer

Description: The global seed to be combined with the local seed

Outputs (1)

state

Type: Integer[nState]

Description: The generated initial states