-
Notifications
You must be signed in to change notification settings - Fork 0
/
sampling.h
58 lines (45 loc) · 1.68 KB
/
sampling.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
51
52
53
54
55
56
57
58
#ifndef _SAMPLING_H
#define _SAMPLING_H
#include <stdlib.h>
#include <stdio.h>
/* Group of functions to generate individual samples from statistical
distributions */
#ifdef __cplusplus
extern "C" {
#endif
void
compute_marginal_quantiles(double *sample_points,
size_t n_points,
size_t n_dims,
size_t sort_dimension,
const double *quantiles,
size_t n_quantiles,
double *quantile_values);
void
compute_marginal_wquantiles(double *sample_points,
double *weights,
size_t n_points,
size_t n_dims,
size_t sort_dimension,
const double *quantiles,
size_t n_quantiles,
double *quantile_values);
double compute_marginal_mean(double *points,
double *weights,
size_t n_points,
size_t n_dims,
size_t dim);
char *print_marginal_quantiles(char *out_buf,
const char *line_label,
const double **quantile_values,
const double *means,
size_t n_quantiles);
void print_numerical_cdfs(FILE *out_fh,
const char *label,
double *sample_points,
size_t n_points,
size_t dim);
#ifdef __cplusplus
}
#endif
#endif // _SAMPLING_H