|
libstp
Robotics library for Botball
|
Classes | |
| struct | Observation |
| Sigma-weighted pose observation pushed by Resync-Steps. More... | |
| struct | LocalizationConfig |
| class | Localization |
| Thread-safe particle-filter localization service. More... | |
| struct | RecorderConfig |
| class | LocalizationRecorder |
Enumerations | |
| enum class | ResamplingAlgorithm : uint8_t { Multinomial = 0 , Residual = 1 , Stratified = 2 , Systematic = 3 } |
Functions | |
| void | computeResampling (ResamplingAlgorithm method, const std::vector< double > &logWeights, std::mt19937 &rng, std::vector< size_t > &outIndexes, size_t outCount=0) |
| double | effectiveSampleRatio (const std::vector< double > &logWeights) |
|
strong |
Definition at line 24 of file resampling.hpp.
|
inline |
Compute resampling indexes from log-weights.
| method | One of ResamplingAlgorithm. |
| logWeights | Per-particle log-weights (unnormalized). |
| rng | Random source. |
| outIndexes | Filled with indexes drawn from logWeights. Resized to outCount (or logWeights.size() if outCount == 0). |
| outCount | Desired output count; 0 means "same as input". |
Definition at line 41 of file resampling.hpp.
|
inline |
Effective sample size (ESS) computed from log-weights, normalized to [0, 1].
Log-sum-exp trick to dodge underflow on tightly peaked weight distributions. Ported from MRPT's CParticleFilterDataImpl::ESS.
Definition at line 199 of file resampling.hpp.