We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a33370 commit f40e1a4Copy full SHA for f40e1a4
1 file changed
core/src/particle.rs
@@ -675,6 +675,9 @@ impl<P: Particle> BasicParticleFilter<P> {
675
///
676
/// This method now wraps the generic resampling functions provided
677
/// by this module.
678
+ ///
679
+ /// Note: Weights should be normalized before resampling so that they
680
+ /// sum to 1.0. Call [`Self::normalize_weights`] first if needed.
681
pub fn resample(&mut self) {
682
let num_particles = self.particles.len();
683
let weights: Vec<f64> = self.particles.iter().map(|p| p.weight()).collect();
0 commit comments