GeNN  2.2.3
GPU enhanced Neuronal Networks (GeNN)
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 <assert.h>
26 #include "isaac.cc"
27 
28 //--------------------------------------------------------------------------
36 //--------------------------------------------------------------------------
37 
38 class randomGen
39 {
40  private:
42  double a;
43 
44  public:
45  explicit randomGen();
46  randomGen(unsigned long, unsigned long, unsigned long);
47  ~randomGen() { }
48  double n();
49  void srand(unsigned long, unsigned long, unsigned long);
50 };
51 
52 class stdRG
53 {
54  private:
55  double themax;
56 
57  public:
58  explicit stdRG();
59  stdRG(unsigned int);
60  ~stdRG() { }
61  double n();
62  unsigned long nlong();
63 };
64 
65 #endif
randomGen()
Constructor for the ISAAC random number generator class without giving explicit seeds.
Definition: randomGen.cc:32
~randomGen()
Definition: randomGen.h:47
void srand(unsigned long, unsigned long, unsigned long)
Function for seeding with fixed seeds.
Definition: randomGen.cc:78
Header file and implementation of the ISAAC random number generator.
~stdRG()
Definition: randomGen.h:60
Class randomGen which implements the ISAAC random number generator for uniformely distributed random ...
Definition: randomGen.h:38
Definition: randomGen.h:52
double n()
Method to obtain a random number from a uniform ditribution on [0,1].
Definition: randomGen.cc:60