add links to examples in readme

This commit is contained in:
NunoSempere 2023-07-24 00:43:53 +02:00
parent 01770e4a91
commit 09601c8d46
3 changed files with 7 additions and 23 deletions

View File

@ -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 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 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 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, we use a gcc extension—nested functions—to rewrite the code from point 2. in a more linear way. 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, 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. 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, we define the cdf for the beta distribution, and we draw samples from it. 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, we take samples from simple gamma and beta distributions, using the samplers provided by this library. 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, we get the 90% confidence interval of a beta distribution 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 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. 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 ## Commentary

View File

@ -41,11 +41,3 @@ int main(){
printf("result_one: %f\n", result_one); printf("result_one: %f\n", result_one);
free(seed); free(seed);
} }
/*
Aggregation mechanisms:
- Quantiles (requires a sort)
- Sum
- Average
- Std
*/

View File

@ -50,11 +50,3 @@ int main(){
printf("]\n"); printf("]\n");
free(seed); free(seed);
} }
/*
Aggregation mechanisms:
- Quantiles (requires a sort)
- Sum
- Average
- Std
*/