GestureRecognitionToolkit  Version: 0.1.0
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
FSMParticle.h
Go to the documentation of this file.
1 
27 #ifndef GRT_FSM_PARTICLE_HEADER
28 #define GRT_FSM_PARTICLE_HEADER
29 
30 #include "../../CoreAlgorithms/ParticleFilter/Particle.h"
31 
32 GRT_BEGIN_NAMESPACE
33 
34 class FSMParticle : public Particle{
35 public:
36  FSMParticle(const unsigned int numDimensions = 0){
37  w = 0;
38  currentState = 0;
39  if( numDimensions > 0 ){
40  x.resize(numDimensions,0);
41  }
42  }
43 
44  FSMParticle(const FSMParticle &rhs){
45  this->w = rhs.w;
46  this->currentState = rhs.currentState;
47  this->x = rhs.x;
48  }
49 
50  FSMParticle& operator=(const FSMParticle &rhs){
51  if( this != &rhs ){
52  this->w = rhs.w;
53  this->currentState = rhs.currentState;
54  this->x = rhs.x;
55  }
56  return *this;
57  }
58 
59  virtual ~FSMParticle(){
60 
61  }
62 
63  int currentState;
64 };
65 
66 GRT_END_NAMESPACE
67 
68 #endif
virtual bool resize(const unsigned int size)
Definition: Vector.h:133