functioninitialState

Returns an initial state for the xorshift128+ algorithm

Extends from Interfaces.initialState (Return the initial internal states for the uniform random number generator).

Information

Syntax

state = Xorshift128plus.initialState(localSeed, globalSeed);

Description

Generates an initial state vector for the Xorshift128plus random number generator (= xorshift128+ 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[Xorshift128plus.nState];
initial equation
  state = initialState(localSeed, globalSeed);

See also

Random.Generators.Xorshift128plus.random.

Inputs

TypeNameDefaultDescription
IntegerlocalSeed (from initialState)The local seed to be used for generating initial states
IntegerglobalSeed (from initialState)The global seed to be combined with the local seed
IntegerstateSize (from initialState)The dimension of the internal state vector

Outputs

TypeNameDefaultDescription
Integerstate (from initialState)The generated initial states

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