31
smc/sampling/ParticleTrajectorieSampler.h
Normal file
31
smc/sampling/ParticleTrajectorieSampler.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user