Changeset 26593


Ignore:
Timestamp:
11/10/21 14:33:27 (3 years ago)
Author:
bulthuis
Message:

CHG: add member functions for random generators in a separate file

Location:
issm/trunk-jpl/src/c/shared/Random
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/shared/Random/randomgenerator.cpp

    r26589 r26593  
    55#include <iostream>
    66#include "./randomgenerator.h"
     7
     8
     9rnd_uniform_distribution::~rnd_uniform_distribution(){}
     10
     11rnd_normal_distribution::~rnd_normal_distribution(){}
  • issm/trunk-jpl/src/c/shared/Random/randomgenerator.h

    r26591 r26593  
    2525    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) {}
    27     ~rnd_uniform_distribution(){}
     27    ~rnd_uniform_distribution();
     28   
    2829    void seed( unsigned int s ) { _seed = s; }
    2930    unsigned int get_seed() { return _seed; }
     
    4445
    4546  public:
     47
     48    /*constructors, destructors: */
    4649    rnd_normal_distribution() : _seed( 0 ), mean( 0), sdev(1.0) {}
    4750    rnd_normal_distribution(double m,double s) : _seed( 0 ), mean( m ), sdev(s) {}
    48     ~rnd_normal_distribution(){}
     51    ~rnd_normal_distribution();
     52
    4953    void seed( unsigned int s ) { _seed = s; }
    5054    double generator()
Note: See TracChangeset for help on using the changeset viewer.