32 lines
900 B
C++
32 lines
900 B
C++
#ifndef PARTICLETRAJECTORIESAMPLER_H
|
|
#define PARTICLETRAJECTORIESAMPLER_H
|
|
|
|
#include <vector>
|
|
#include "..//Particle.h"
|
|
|
|
namespace SMC {
|
|
|
|
/**
|
|
* interface for Sampling Trajectories of Particles
|
|
*/
|
|
template <typename State>
|
|
class ParticleTrajectorieSampler {
|
|
|
|
public:
|
|
|
|
/** draw a single particle */
|
|
virtual Particle<State> drawSingleParticle(std::vector<Particle<State>> const& particles) = 0;
|
|
|
|
/** draw a trajectorie of all incoming particles / like resampling*/
|
|
virtual std::vector<Particle<State>> drawTrajectorie(std::vector<Particle<State>>const& particles, const int num) = 0;
|
|
|
|
private:
|
|
|
|
/** function for drawing particles */
|
|
virtual Particle<State> draw(const double cumWeight, std::vector<Particle<State>> const& cumParticles, std::vector<Particle<State>> const& origParticles) = 0;
|
|
};
|
|
|
|
}
|
|
|
|
#endif // ARTIFICIALDISTRIBUTION_H
|