tabbing...

This commit is contained in:
toni
2018-11-24 17:21:49 +01:00
parent 9de1e7142b
commit cb61e0fe68
3 changed files with 19 additions and 19 deletions

View File

@@ -29,7 +29,7 @@ namespace SMC {
State state;
/** the (current) probability for this state */
double weight;
double weight;
/** empty ctor */

View File

@@ -138,13 +138,13 @@ namespace SMC {
if (lastNEff < particles.size() * nEffThresholdPercent) {resampler->resample(particles); }
// perform the transition step
transition->transition(particles, control);
transition->transition(particles, control);
// perform the evaluation step and calculate the sum of all particle weights
evaluation->evaluation(particles, observation);
// normalize the particle weights and thereby calculate N_eff
lastNEff = normalize();
// normalize the particle weights and thereby calculate N_eff
lastNEff = normalize();
//std::cout << "normalized. n_eff is " << lastNEff << std::endl;
@@ -160,7 +160,7 @@ namespace SMC {
void updateTransitionOnly(const Control* control) {
// sanity checks (if enabled)
Assert::isNotNull(transition, "transition MUST not be null! call setTransition() first!");
Assert::isNotNull(transition, "transition MUST not be null! call setTransition() first!");
// perform the transition step
transition->transition(particles, control);
@@ -171,13 +171,13 @@ 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!");
// if the number of efficient particles is too low, perform resampling
if (lastNEff < particles.size() * nEffThresholdPercent) { resampler->resample(particles); }
//resampler->resample(particles);
// if the number of efficient particles is too low, perform resampling
if (lastNEff < particles.size() * nEffThresholdPercent) { resampler->resample(particles); }
//resampler->resample(particles);
// perform the evaluation step and calculate the sum of all particle weights
evaluation->evaluation(particles, observation);
@@ -188,7 +188,7 @@ 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
lastNEff = normalize();
lastNEff = normalize();
// estimate the current state
const State est = estimation->estimate(particles);