diff --git a/README.md b/README.md index 06e1baa..de50b1e 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,13 @@ A self-contained C99 library that provides a subset of [Squiggle](https://www.sq You can follow some example usage in the examples/ folder 1. In the [1st example](examples/01_one_sample/example.c), we define a small model, and draw one sample from it -2. In the 2nd example, we define a small model, and return many samples -3. In the 3rd example, we use a gcc extension—nested functions—to rewrite the code from point 2. in a more linear way. -4. In the 4th example, we define some simple cdfs, and we draw samples from those cdfs. We see that this approach is slower than using the built-in samplers, e.g., the normal sampler. -5. In the 5th example, we define the cdf for the beta distribution, and we draw samples from it. -6. In the 6th example, we take samples from simple gamma and beta distributions, using the samplers provided by this library. -7. In the 7th example, we get the 90% confidence interval of a beta distribution -8. The 8th example translates the models from Eli and Nuño from [Samotsvety Nuclear Risk Forecasts — March 2022](https://forum.nunosempere.com/posts/KRFXjCqqfGQAYirm5/samotsvety-nuclear-risk-forecasts-march-2022#Nu_o_Sempere) into squiggle.c, then creates a mixture from both, and returns the mean probability of death per month and the 90% confidence interval. +2. In the [2nd example](examples/02_many_samples/example.c), we define a small model, and return many samples +3. In the [3rd example](examples/03_gcc_nested_function/example.c), we use a gcc extension—nested functions—to rewrite the code from point 2. in a more linear way. +4. In the [4th example](examples/04_sample_from_cdf_simple/example.c), we define some simple cdfs, and we draw samples from those cdfs. We see that this approach is slower than using the built-in samplers, e.g., the normal sampler. +5. In the [5th example](examples/05_sample_from_cdf_beta/example.c), we define the cdf for the beta distribution, and we draw samples from it. +6. In the [6th example](examples/06_gamma_beta/example.c), we take samples from simple gamma and beta distributions, using the samplers provided by this library. +7. In the [7th example](examples/07_ci_beta/example.c), we get the 90% confidence interval of a beta distribution +8. The [8th example](examples/08_nuclear_war/example.c) translates the models from Eli and Nuño from [Samotsvety Nuclear Risk Forecasts — March 2022](https://forum.nunosempere.com/posts/KRFXjCqqfGQAYirm5/samotsvety-nuclear-risk-forecasts-march-2022#Nu_o_Sempere) into squiggle.c, then creates a mixture from both, and returns the mean probability of death per month and the 90% confidence interval. ## Commentary diff --git a/examples/01_one_sample/example.c b/examples/01_one_sample/example.c index c0668a8..c0ddd00 100644 --- a/examples/01_one_sample/example.c +++ b/examples/01_one_sample/example.c @@ -41,11 +41,3 @@ int main(){ printf("result_one: %f\n", result_one); free(seed); } - -/* -Aggregation mechanisms: -- Quantiles (requires a sort) -- Sum -- Average -- Std -*/ diff --git a/examples/02_many_samples/example.c b/examples/02_many_samples/example.c index 18ec1eb..f7ea419 100644 --- a/examples/02_many_samples/example.c +++ b/examples/02_many_samples/example.c @@ -50,11 +50,3 @@ int main(){ printf("]\n"); free(seed); } - -/* -Aggregation mechanisms: -- Quantiles (requires a sort) -- Sum -- Average -- Std -*/