Qualia  0.2
random.h
Go to the documentation of this file.
1 /*
2  * Random.h
3  *
4  * Provides methods for generating uniform random numbers.
5  *
6  * This file is part of Qualia https://github.com/sofian/qualia
7  *
8  * (c) 2008 Sofian Audry -- info(@)sofianaudry(.)com
9  *
10  * This class was adapted from the files Random.{h,cc} in the Torch
11  * library (http://torch.ch)
12  * Copyright (C) 2003--2004 Ronan Collobert (collober@idiap.ch)
13  *
14  * This program is free software: you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation, either version 3 of the License, or
17  * (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with this program. If not, see <http://www.gnu.org/licenses/>.
26  */
27 #ifndef RANDOM_INC
28 #define RANDOM_INC
29 
33 #include <qualia/core/common.h>
34 
35 #include <limits.h>
36 #include <stdlib.h>
37 
38 // Floating point random numbers.
39 
41 float randomUniform();
42 
44 float randomUniform(float h);
45 
47 float randomUniform(float a, float b);
48 
49 #endif