Changeset 26596


Ignore:
Timestamp:
11/10/21 15:24:04 (3 years ago)
Author:
bulthuis
Message:

BUG: Try to fix bugs pseudo-random number generators

Location:
issm/trunk-jpl/src/c
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/Makefile.am

    r26526 r26596  
    188188        ./shared/Elements/EstarComponents.cpp \
    189189        ./shared/Random/random.cpp \
     190        ./shared/Random/randomgenerator.cpp \
    190191        ./shared/String/DescriptorIndex.cpp \
    191192        ./toolkits/issm/IssmToolkitUtils.cpp \
  • issm/trunk-jpl/src/c/shared/Random/randomgenerator.cpp

    r26595 r26596  
    99#define M_PI 3.141592653589793238462643
    1010
    11 rnd_uniform_distribution::rnd_uniform_distribution(){/*{{{*/
     11//rnd_uniform_distribution::rnd_uniform_distribution(){/*{{{*/
    1212
    13                 a   = 1103515245;       // BSD Formula
    14                 c  = 12345;                                     // BSD Formula
    15                 m = 2147483648;                 // BSD Formula
    16                 _seed = 0;
    17                 lbound = 0.0;
    18                 ubound = 1.0;
    19                 return;
    20 }
     13//              a   = 1103515245;       // BSD Formula
     14//              c  = 12345;                                     // BSD Formula
     15//              m = 2147483648;                 // BSD Formula
     16//              _seed = 0;
     17//              lbound = 0.0;
     18//              ubound = 1.0;
     19//              return;
     20//}
    2121/*}}}*/
  • issm/trunk-jpl/src/c/shared/Random/randomgenerator.h

    r26595 r26596  
    2323
    2424    /*constructors, destructors: */
    25     rnd_uniform_distribution();
     25    rnd_uniform_distribution() : _seed( 0 ), a( 1103515245 ), c( 12345 ), m( 2147483648 ), lbound(0.0), ubound(1.0) {}
    2626    rnd_uniform_distribution(double a_1,double a_2) : _seed( 0 ), a( 1103515245 ), c( 12345 ), m( 2147483648 ), lbound(a_1), ubound(a_2) {}
    2727    ~rnd_uniform_distribution(){}
Note: See TracChangeset for help on using the changeset viewer.