Skip to content

Commit

Permalink
Reword algorithm description
Browse files Browse the repository at this point in the history
Co-authored-by: Michel Hidalgo <michel@ekumenlabs.com>
Signed-off-by: Nahuel Espinosa <nespinosa@ekumenlabs.com>
  • Loading branch information
nahueespinosa and hidmic authored Jan 15, 2024
1 parent f0ccd6b commit 43f46e6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions beluga/include/beluga/views/sample.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<detail::sample_fn> sample;

Expand Down

0 comments on commit 43f46e6

Please sign in to comment.