stuff dont know git...
This commit is contained in:
4
navMesh/meshPlotter.h
Normal file
4
navMesh/meshPlotter.h
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#ifndef MESHPLOTTER_H
|
||||||
|
#define MESHPLOTTER_H
|
||||||
|
|
||||||
|
#endif // MESHPLOTTER_H
|
||||||
@@ -171,9 +171,9 @@ namespace SMC {
|
|||||||
State updateEvaluationOnly(const Observation& observation) {
|
State updateEvaluationOnly(const Observation& observation) {
|
||||||
|
|
||||||
// sanity checks (if enabled)
|
// 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(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
|
// perform the evaluation step and calculate the sum of all particle weights
|
||||||
evaluation->evaluation(particles, observation);
|
evaluation->evaluation(particles, observation);
|
||||||
@@ -184,13 +184,13 @@ namespace SMC {
|
|||||||
//Assert::isNotNull(weightSum, "sum of all particle weights (returned from eval) is 0.0!");
|
//Assert::isNotNull(weightSum, "sum of all particle weights (returned from eval) is 0.0!");
|
||||||
|
|
||||||
// normalize the particle weights and thereby calculate N_eff
|
// normalize the particle weights and thereby calculate N_eff
|
||||||
const double neff = normalize();
|
const double neff = normalize();
|
||||||
|
|
||||||
// estimate the current state
|
// estimate the current state
|
||||||
const State est = estimation->estimate(particles);
|
const State est = estimation->estimate(particles);
|
||||||
|
|
||||||
// if the number of efficient particles is too low, perform resampling
|
// if the number of efficient particles is too low, perform resampling
|
||||||
if (neff < particles.size() * nEffThresholdPercent) { resampler->resample(particles); }
|
if (neff < particles.size() * nEffThresholdPercent) { resampler->resample(particles); }
|
||||||
|
|
||||||
// done
|
// done
|
||||||
return est;
|
return est;
|
||||||
|
|||||||
Reference in New Issue
Block a user