-
Notifications
You must be signed in to change notification settings - Fork 0
/
statistic.h
50 lines (38 loc) · 983 Bytes
/
statistic.h
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
* @file statistic.h
* @brief Function prototypes for statistic module
*
* Functions provide statistical tools
*
*/
#ifndef _STATISTIC_H
#define _STATISTIC_H
void __attribute__((constructor)) libinit_statistic();
/** @brief Uniform distribution from 0 to 1
*/
double ran1();
/** @brief Normal distribution, mean=0, sigma=1
*/
double gauss();
/** @brief truncated (-1/+1) sigma = 1 mean = 0 gaussian probability
*/
double gauss_trc();
/** @brief Poisson distribution
*
* @param mu Distribution mean
*/
long poisson(double mu);
/** @brief Gamma function
*/
double gammaln(double xx);
double better_poisson(double mu);
double fast_poisson(double mu);
/** @brief Apply Poisson noise to image
*/
long put_poisson_noise(const char *ID_in_name, const char *ID_out_name);
/** @brief Apply Gaussian noise to image
*/
long put_gauss_noise(const char *ID_in_name,
const char *ID_out_name,
double ampl);
#endif