state = Xorshift128plus.initialState(localSeed, globalSeed);
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.
parameter Integer localSeed; parameter Integer globalSeed; Integer state[Xorshift128plus.nState]; initial equation state = initialState(localSeed, globalSeed);
Random.Generators.Xorshift128plus.random.
function initialState extends Modelica.Icons.Function; input Integer localSeed "The local seed to be used for generating initial states"; input Integer globalSeed "The global seed to be combined with the local seed"; output Integer state[nState] "The generated initial states"; end initialState;
Date | Description | ||
---|---|---|---|
June 22, 2015 |
|