From d670b89c4d942c584b4730ab99fe6f3eb6b78b1a Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Thu, 1 Dec 2022 23:57:45 +0000 Subject: [PATCH] tweak: cleanup. --- C/samples/samples.c | 6 ++---- README.md | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/C/samples/samples.c b/C/samples/samples.c index 95f8ff02..7f04bb69 100755 --- a/C/samples/samples.c +++ b/C/samples/samples.c @@ -74,7 +74,7 @@ void mixture(gsl_rng * r, double *dists[], double *weights, int n, double *resul double cummulative_weights[n]; cumsum(normalized_weights, cummulative_weights, n); - /* Get N uniformly distributed vars */ + /* Get N samples, drawn from the different distributions in proportion to their weights. */ for(int i=0; i