GestureRecognitionToolkit  Version: 1.0 Revision: 04-03-15
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
TimeSeriesClassificationSample.h
Go to the documentation of this file.
1 
29 #ifndef GRT_TIME_SERIES_CLASSIFICATION_SAMPLE_HEADER
30 #define GRT_TIME_SERIES_CLASSIFICATION_SAMPLE_HEADER
31 
32 #include "../Util/GRTCommon.h"
33 
34 namespace GRT{
35 
37 public:
39  TimeSeriesClassificationSample(const UINT classLabel,const MatrixDouble &data);
42 
44  if( this != &rhs){
45  this->classLabel = rhs.classLabel;
46  this->data = rhs.data;
47  }
48  return *this;
49  }
50 
51  inline double* operator[] (const UINT &n){
52  return data[n];
53  }
54 
55  inline const double* operator[] (const UINT &n) const {
56  return data[n];
57  }
58 
59  bool clear();
60  bool addSample(const UINT classLabel,const VectorDouble &sample);
61  bool setTrainingSample(const UINT classLabel,const MatrixDouble &data);
62  inline UINT getLength() const { return data.getNumRows(); }
63  inline UINT getNumDimensions() const { return data.getNumCols(); }
64  inline UINT getClassLabel() const { return classLabel; }
65  MatrixDouble &getData(){ return data; }
66  const MatrixDouble &getData() const { return data; }
67 
68 protected:
69  UINT classLabel;
70  MatrixDouble data;
71 };
72 
73 } //End of namespace GRT
74 
75 #endif //GRT_LABELLED_TIME_SERIES_CLASSIFICATION_SAMPLE_HEADER
Definition: AdaBoost.cpp:25
unsigned int getNumCols() const
Definition: Matrix.h:538
unsigned int getNumRows() const
Definition: Matrix.h:531