forked from personal/squiggle.c
fix: add type to squiggle_more.h; fix type
This commit is contained in:
parent
d78a5cd182
commit
2744136d68
|
@ -300,13 +300,13 @@ void array_print_histogram(double* xs, int n_samples, int n_bins) {
|
|||
free(bins);
|
||||
}
|
||||
|
||||
void array_print_90_ci_histogram(double* xs, int n){
|
||||
void array_print_90_ci_histogram(double* xs, int n_samples, int n_bins){
|
||||
// Code duplicated from previous function
|
||||
// I'll consider simplifying it at some future point
|
||||
// Possible ideas:
|
||||
// - having only one function that takes any confidence interval?
|
||||
// - having a utility function that is called by both functions?
|
||||
ci ci_90 = array_get_90_ci(xs, n);
|
||||
ci ci_90 = array_get_90_ci(xs, n_samples);
|
||||
|
||||
if (n_bins <= 1) {
|
||||
fprintf(stderr, "Number of bins must be greater than 1.\n");
|
||||
|
|
|
@ -12,8 +12,10 @@ typedef struct ci_t {
|
|||
} ci;
|
||||
ci array_get_ci(ci interval, double* xs, int n);
|
||||
ci array_get_90_ci(double xs[], int n);
|
||||
|
||||
void array_print_stats(double xs[], int n);
|
||||
void array_print_histogram(double* xs, int n_samples, int n_bins);
|
||||
void array_print_90_ci_histogram(double* xs, int n, int n_bins);
|
||||
|
||||
// Deprecated: get confidence intervals directly from samplers
|
||||
ci sampler_get_ci(ci interval, double (*sampler)(uint64_t*), int n, uint64_t* seed);
|
||||
|
|
Loading…
Reference in New Issue
Block a user