-
Notifications
You must be signed in to change notification settings - Fork 1
/
random.h
executable file
·62 lines (58 loc) · 1.71 KB
/
random.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef i_random
#define i_random
#include <random>
#include <vector>
using namespace std;
struct random
{
// static std::mt19937* generator;
// static bool initialized;
// static void initializeRandom(unsigned int init_seed=0);
static int randomInteger (int); // careful, borders are reached
static int randomInteger(int a,int b);
static double randomDouble (double);
static double cell_cycle_time (double,int);
///RRR
static float randomFloat(int a);
static float randomFloat(int a, int b);
bool areEqualRel(float a, float b, float epsilon);
///RRR
// static double randomGaussian(double, double);
// static double boundedRandomGaussian(double mean , double SD, double vmin, double vmax);
// template<typename T>
//
//// static void shuffle(vector<T> v){
//// if(!initialized) initializeRandom();
//// std::shuffle(v.begin(), v.end(), *generator);
//// }
//
// void shuffle(vector<double>);
// void shuffle(vector<int>);
};
double inverse_erf(double x);
class gauss_randomize {
public:
gauss_randomize();
gauss_randomize(short dataset);
~gauss_randomize();
double get_distribution_value();
private:
void gauss_initialize(double, double, int, double, double);
double gauss(double&,double&,double&);
void cyster_initialize();
double cyster07angle_wt(int angle);
vector <double> field;
int arraydim;
////§§§ Philippe 21-03-2017
static const double Ny;
};
/*class permutations {
public:
permutations(int dim);
vector<int> get_rand_permutation();
private:
int n_permut;
int dimension;
vector< vector <int> > savedPermutations;
};*/
#endif