Commit 478f365a79315b5bc286e627f914cde1b94c72a3

Authored by David Mayerich
1 parent 029c021a

added pptx file format

Showing 2 changed files with 8 additions and 10 deletions   Show diff stats
stim/biomodels/nwt_format.pptx 0 → 100644
No preview for this file type
stim/math/random.h
... ... @@ -12,25 +12,23 @@ namespace stim{
12 12 template<class T>
13 13 class Random{
14 14 protected:
15   - void init(int seed = 0)
16   - {
17   - if(seed <= 0)
18   - srand(time(NULL));
19   - else if(seed > 0)
20   - srand(time(seed));
21   - else
22   - std::cout << "Error: Unknown value: in STIM::RANDOM" << std::endl;
  15 + void init() {
  16 + srand(time(NULL));
  17 + }
  18 +
  19 + void init(unsigned int seed){
  20 + srand(seed);
23 21 }
24 22  
25 23 public:
26 24 /// Default Constructor
27 25 Random(){
28   - init(-1);
  26 + init();
29 27 }
30 28  
31 29 /// Constructor from a seed.
32 30 /// A positive seed sets, 0 or negative yeilds the
33   - Random(int seed){
  31 + Random(unsigned int seed){
34 32 init(seed);
35 33 }
36 34  
... ...