From 43f46e692e35394df546f5d78ed00706b9ca97a8 Mon Sep 17 00:00:00 2001 From: Nahuel Espinosa Date: Mon, 15 Jan 2024 09:06:07 -0300 Subject: [PATCH] Reword algorithm description Co-authored-by: Michel Hidalgo Signed-off-by: Nahuel Espinosa --- beluga/include/beluga/views/sample.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/beluga/include/beluga/views/sample.hpp b/beluga/include/beluga/views/sample.hpp index ad8b22871..3e8c1f641 100644 --- a/beluga/include/beluga/views/sample.hpp +++ b/beluga/include/beluga/views/sample.hpp @@ -189,9 +189,10 @@ struct sample_fn { * [random_access_range](https://en.cppreference.com/w/cpp/ranges/random_access_range) * and [sized_range](https://en.cppreference.com/w/cpp/ranges/sized_range) concepts. * - * This view implements multinomial resampling for a given range of particles. The core idea - * is to generate independently N random numbers and use them to select particles from the - * input range. + * This view implements multinomial resampling for a given range of particles. + * The core idea is to draw random indices / iterators to the input particle range + * from a [multinomial distribution](https://en.wikipedia.org/wiki/Multinomial_distribution) + * parameterized after particle weights (and assumed uniform for non-weighted particle ranges). */ inline constexpr ranges::views::view_closure sample;