summaryrefslogtreecommitdiff
path: root/lib/ldpc/peg/Random.h
blob: ef22bfd3d62c69bffa1009e197fa1f1b7d7e375d (plain)
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

#ifndef RANDOM
#define RANDOM 1

#include <cstdlib>
// #include <iostream>

class Random{
 private:

  unsigned long int seed;  //previously LONG INT
  unsigned long int seed_u;
  
 public:

  Random(void) {
    this->seed=987654321u;
    this->seed_u=123456789lu;
  }
  ~Random(void){;}
  void bubbleSort(int a[], int size);
  double gauss(double sdev, double mean);
  double uniform(double a, double b);
  int uniform(int  a, int b); // [a, b)
  int nonUniform(int  a, int b);

}; 

#endif