Пример #1
0
void ParticleFilter::Resample()
{
    if (myParticles.size() == 0)
        return;
    
//    MultinomialResample();
#if sampling == RESIDUAL
    ResidualResample();
#elif sampling == IMPORTANCE
    ImportanceResample();
#elif sampling == SCATTER
    ScatterResample();
#endif
//    cout << "sampled " << myParticles.size() << " new samples" << endl;
}
Пример #2
0
	virtual void SelectData( const Dataset& data, unsigned int subsetSize, Dataset& subset )
	{
		ImportanceResample( data, proposal, target, subsetSize, subset );
	}