From 2744136d68ab1cceed4737c54c9d5ee3f02367bf Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Wed, 31 Jan 2024 15:19:12 +0100 Subject: [PATCH] fix: add type to squiggle_more.h; fix type --- squiggle_more.c | 4 ++-- squiggle_more.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/squiggle_more.c b/squiggle_more.c index c167daa..6d42eee 100644 --- a/squiggle_more.c +++ b/squiggle_more.c @@ -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"); diff --git a/squiggle_more.h b/squiggle_more.h index 07f07a1..fa9ef43 100644 --- a/squiggle_more.h +++ b/squiggle_more.h @@ -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);