Skip to content
  • Benjamin Beichler's avatar
    8f077ca2
    reworked random seed and random engine · 8f077ca2
    Benjamin Beichler authored and Benjamin Beichler's avatar Benjamin Beichler committed
    - now use pcg prng engine(https://www.pcg-random.org/
    
    ), since it is faster, has nice static characteristics and is easier to init (only a single 64bit number with no requirements, mt19937 needs 2k of initial state, which is generated std::seed_seq, but this can cause problems)
    - add an CLI Parameter to set the seed (previously, only possible at compile and not at runtime)
    - reworked the app4mcsim_seed drastically to remove the ridiculusly complicated legacy code
    - use random_device for seed correctly on any platform, if no seed was given by cli
    
    Signed-off-by: default avatarBenjamin Beichler <Benjamin.Beichler@uni-rostock.de>
    8f077ca2
    reworked random seed and random engine
    Benjamin Beichler authored and Benjamin Beichler's avatar Benjamin Beichler committed
    - now use pcg prng engine(https://www.pcg-random.org/
    
    ), since it is faster, has nice static characteristics and is easier to init (only a single 64bit number with no requirements, mt19937 needs 2k of initial state, which is generated std::seed_seq, but this can cause problems)
    - add an CLI Parameter to set the seed (previously, only possible at compile and not at runtime)
    - reworked the app4mcsim_seed drastically to remove the ridiculusly complicated legacy code
    - use random_device for seed correctly on any platform, if no seed was given by cli
    
    Signed-off-by: default avatarBenjamin Beichler <Benjamin.Beichler@uni-rostock.de>
Loading