stuff dont know git...
This commit is contained in:
@@ -171,9 +171,9 @@ namespace SMC {
|
||||
State updateEvaluationOnly(const Observation& observation) {
|
||||
|
||||
// sanity checks (if enabled)
|
||||
Assert::isNotNull(resampler, "resampler MUST not be null! call setResampler() first!");
|
||||
Assert::isNotNull(resampler, "resampler MUST not be null! call setResampler() first!");
|
||||
Assert::isNotNull(evaluation, "evaluation MUST not be null! call setEvaluation() first!");
|
||||
Assert::isNotNull(estimation, "estimation MUST not be null! call setEstimation() first!");
|
||||
Assert::isNotNull(estimation, "estimation MUST not be null! call setEstimation() first!");
|
||||
|
||||
// perform the evaluation step and calculate the sum of all particle weights
|
||||
evaluation->evaluation(particles, observation);
|
||||
@@ -184,13 +184,13 @@ namespace SMC {
|
||||
//Assert::isNotNull(weightSum, "sum of all particle weights (returned from eval) is 0.0!");
|
||||
|
||||
// normalize the particle weights and thereby calculate N_eff
|
||||
const double neff = normalize();
|
||||
const double neff = normalize();
|
||||
|
||||
// estimate the current state
|
||||
const State est = estimation->estimate(particles);
|
||||
|
||||
// if the number of efficient particles is too low, perform resampling
|
||||
if (neff < particles.size() * nEffThresholdPercent) { resampler->resample(particles); }
|
||||
// if the number of efficient particles is too low, perform resampling
|
||||
if (neff < particles.size() * nEffThresholdPercent) { resampler->resample(particles); }
|
||||
|
||||
// done
|
||||
return est;
|
||||
|
||||
Reference in New Issue
Block a user