From 9ae5e093871f7708972fae0dbc71f579d1b4f4f7 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sun, 25 Feb 2024 21:58:40 -0300 Subject: [PATCH] final formatting tweaks --- README.md | 1 - probppl.go | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 45aced9..c5fb989 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,6 @@ You can see the code [here](https://git.nunosempere.com/NunoSempere/peopleprobs/ With that code, the posterior over the number of people my followers know stands as: - | Num people known | % | | ---- | ----- | | ~16 | 7.2% | diff --git a/probppl.go b/probppl.go index 05a4025..9d966d4 100644 --- a/probppl.go +++ b/probppl.go @@ -99,8 +99,8 @@ func draw148PplFromDistributionAndCheck(d IntProbs, r src, show bool) int64 { count[person_i_num_birthday_matches]++ } /* - Draw 148 times - How many people do you know that were born in the same day of the year as you? + Draw 148 times + How many people do you know that were born in the same day of the year as you? 0: 46.6% | 69 1: 31.1% | 46 2: 12.8% | 19 @@ -140,13 +140,14 @@ func main() { for j := i * (n_dists / num_threads); j < (i+1)*(n_dists/num_threads); j++ { - // Get + // Get indivisual distributions people_known_distribution := generatePeopleKnownDistribution(r) result := getUnnormalizedBayesianUpdateForDistribution(people_known_distribution, r) if result > 0 { dists[j] = IntProbsWeights{IntProbs: people_known_distribution, w: result} } else { - dists[j] = IntProbsWeights{IntProbs: nil, w: 0} // make explicit that this is initialized to nil; we won't compute it later becasue weight is 0 + dists[j] = IntProbsWeights{IntProbs: nil, w: 0} + // make explicit that this is initialized to nil; we won't compute it later becasue weight is 0 } } }()