43 const int nRealNumParticles = m_nParticles;
44 if (nNumParticlesToUse > 0 && nNumParticlesToUse < m_nParticles)
46 m_nParticles = nNumParticlesToUse;
51 PredictNewBases(dSigmaFactor);
54 #pragma omp parallel for num_threads(m_nNumParallelThreads) schedule(guided, 10)
55 for (
int i = 0; i < m_nParticles; i++)
57 const int nThreadNumber = omp_get_thread_num();
59 UpdateModel(i, nThreadNumber);
62 pi[i] = CalculateProbability(i, nThreadNumber);
65 CalculateFinalProbabilities();
68 for (
int i = 0; i < m_nParticles; i++)
74 ARMARX_WARNING_S <<
"CParticleFilterFrameworkParallelized::ParticleFilter(): Error: double values has overrun!";
79 const double factor = 1 / c_total;
80 for (
int i = 0; i < m_nParticles; i++)
87 GetMeanConfiguration(pResultMeanConfiguration);
89 m_nParticles = nRealNumParticles;
91 return CalculateProbabilityForConfiguration(pResultMeanConfiguration);