Qualia  0.2
random_dist.h
Go to the documentation of this file.
1 /*
2  * random_dist.h
3  *
4  * Extra random distributions.
5  *
6  * (c) 2012 Sofian Audry -- info(@)sofianaudry(.)com
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef RANDOM_DIST_H_
23 #define RANDOM_DIST_H_
24 
25 #include "random.h"
26 #include <math.h>
27 
37 float exponential(float lambda);
38 
43 float cauchy(float median = 0, float sigma = 1);
44 
50 int geometric(float p);
51 
53 bool bernouilli(float p = 0.5);
54 
55 #endif /* RANDOM_DIST_H_ */