GeNN  1.1
GPU enhanced Neuronal Networks (GeNN)
 All Classes Files Functions Variables Typedefs Macros Pages
randomGen.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------
2  Author: Thomas Nowotny
3 
4  Institute: Institute for Nonlinear Dynamics
5  University of California San Diego
6  La Jolla, CA 92093-0402
7 
8  email to: tnowotny@ucsd.edu
9 
10  initial version: 2002-02-01
11 
12 --------------------------------------------------------------------------*/
13 
14 #ifndef RANDOMGEN_H
15 #define RANDOMGEN_H
16 //--------------------------------------------------------------------------
17 
20 //--------------------------------------------------------------------------
21 
22 #include <time.h>
23 #include <limits.h>
24 #include <stdlib.h>
25 #include "isaac.hpp"
26 #include <assert.h>
27 
28 //--------------------------------------------------------------------------
36 //--------------------------------------------------------------------------
37 
38 class randomGen
39 {
40  private:
41  QTIsaac<8, unsigned long> TheGen;
42  double a;
43 
44  public:
45  explicit randomGen();
46  randomGen(unsigned long, unsigned long, unsigned long);
47  ~randomGen() { }
48  double n();
49 };
50 
51 class stdRG
52 {
53  private:
54  double themax;
55 
56  public:
57  explicit stdRG();
58  stdRG(unsigned int);
59  ~stdRG() { }
60  double n();
61  unsigned long nlong();
62 };
63 
64 //#include "randomGen.cc"
65 
66 #endif
double n()
Method to generate a uniform random number.
Definition: randomGen.cc:108
randomGen()
Constructor for the ISAAC random number generator class without giving explicit seeds.
Definition: randomGen.cc:32
~randomGen()
Definition: randomGen.h:47
unsigned long nlong()
~stdRG()
Definition: randomGen.h:59
stdRG()
Constructor of the standard random number generator class without explicit seed.
Definition: randomGen.cc:81
Class randomGen which implements the ISAAC random number generator for uniformely distributed random ...
Definition: randomGen.h:38
Definition: randomGen.h:51
double n()
Method to obtain a random number from a uniform ditribution on [0,1].
Definition: randomGen.cc:60