hips
Loading...
Searching...
No Matches
randomGenerator.h
Go to the documentation of this file.
1#pragma once
2
3#include "MersenneTwister.h"
4
6
8
9private :
10
12
13public :
14
15 inline double getRand() {
16 return mtwist.rand();
17 }
18 inline int getRandInt(unsigned n) {
19 return mtwist.randInt(n);
20 }
21
22 randomGenerator(const int aseed) : mtwist(aseed) {
23 if(aseed < 0) // randomize the seed
24 mtwist.seed();
25 }
27};
void seed(const uint32 oneSeed)
double rand()
uint32 randInt()
int getRandInt(unsigned n)
MTRand mtwist
Mersenne twister object.
randomGenerator(const int aseed)