rng.h 1.03 KB
Newer Older
Brice Videau's avatar
Brice Videau committed
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
#ifndef _CCS_RNG_H
#define _CCS_RNG_H

#ifdef __cplusplus
extern "C" {
#endif

#include <gsl/gsl_rng.h>

extern ccs_error_t
ccs_rng_create(ccs_rng_t *rng_ret);

extern ccs_error_t
ccs_rng_create_with_type(const gsl_rng_type *rng_type,
                         ccs_rng_t          *rng_ret);

extern ccs_error_t
ccs_rng_get_type(ccs_rng_t            rng,
                 const gsl_rng_type **rng_type_ret);

extern ccs_error_t
ccs_rng_set_seed(ccs_rng_t         rng,
                 unsigned long int seed);

extern ccs_error_t
ccs_rng_get(ccs_rng_t          rng,
            unsigned long int *value_ret);

extern ccs_error_t
Brice Videau's avatar
Brice Videau committed
30
31
ccs_rng_uniform(ccs_rng_t    rng,
                ccs_float_t *value_ret);
Brice Videau's avatar
Brice Videau committed
32
33
34
35
36

extern ccs_error_t
ccs_rng_get_gsl_rng(ccs_rng_t   rng,
                    gsl_rng   **gsl_rng_ret);

Brice Videau's avatar
Brice Videau committed
37
38
39
40
41
42
43
44
extern ccs_error_t
ccs_rng_min(ccs_rng_t          rng,
            unsigned long int *value_ret);

extern ccs_error_t
ccs_rng_max(ccs_rng_t          rng,
            unsigned long int *value_ret);

Brice Videau's avatar
Brice Videau committed
45
46
47
48
49
#ifdef __cplusplus
}
#endif

#endif //_CCS_RNG_H