00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _rng_h_
00011 #define _rng_h_
00012
00013 #ifdef __cplusplus
00014 extern "C" {
00015 #ifdef NOT_DEFINED
00016 }
00017 #endif
00018 #endif
00019
00020
00021 char *rng_name(void);
00022 int rng_numeric_name(void);
00023
00024
00025 int rng_init_state_seeded(int);
00026
00027 int rng_init_state(void);
00028
00029 int rng_new_seed(void);
00030
00031
00032 int rng_state_length(void);
00033 int rng_get_state(char *, int);
00034
00035
00036 int rng_set_state(char *, int);
00037
00038
00039
00040 double rng_uniform(void);
00041
00042
00043 double rng_normal(void);
00044 double rng_normal_old(void);
00045 double rng_normal_sdev(double mu, double sigma);
00046 double rng_normal_var(double mu, double sigma2);
00047
00048
00049 double rng_gamma(double, double);
00050 double rng_beta(double, double);
00051 double rng_chi2(double r);
00052 double rng_exponential(void);
00053
00054
00055 double rng_poisson(double);
00056 double rng_geometric(double);
00057 double rng_binomial(double, double);
00058
00059
00060 int rng_normal_vector(double* x, double* mu, double* sigma, int n, int d,
00061 int stridex1, int stridex2, int stridemu);
00062 int rng_wishart(double* sigma, double dof, double scale, int N, double* w);
00063
00064 #ifdef __cplusplus
00065 #ifdef NOT_DEFINED
00066 {
00067 #endif
00068 }
00069 #endif
00070
00071 #endif