GestureRecognitionToolkit  Version: 0.2.5
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
TimeSeriesPositionTracker.h
Go to the documentation of this file.
1 
29 #ifndef GRT_TIME_SERIES_POSITION_TRACKER_HEADER
30 #define GRT_TIME_SERIES_POSITION_TRACKER_HEADER
31 
32 #include "../Util/GRTCommon.h"
33 
34 GRT_BEGIN_NAMESPACE
35 
37 public:
45  TimeSeriesPositionTracker(UINT startIndex=0,UINT endIndex=0,UINT classLabel=0){
46  this->startIndex = startIndex;
47  this->endIndex = endIndex;
48  this->classLabel = classLabel;
49  }
50 
57  this->startIndex = rhs.startIndex;
58  this->endIndex = rhs.endIndex;
59  this->classLabel = rhs.classLabel;
60  }
61 
66 
74  if( this != &rhs){
75  this->startIndex = rhs.startIndex;
76  this->endIndex = rhs.endIndex;
77  this->classLabel = rhs.classLabel;
78  }
79  return *this;
80  }
81 
82 
91  void setTracker(UINT startIndex,UINT endIndex,UINT classLabel){
92  this->startIndex = startIndex;
93  this->endIndex = endIndex;
94  this->classLabel = classLabel;
95  }
96 
103  void setStartIndex(UINT startIndex){ this->startIndex = startIndex; }
104 
111  void setEndIndex(UINT endIndex){ this->endIndex = endIndex; }
112 
119  void setClassLabel(UINT classLabel){ this->classLabel = classLabel; }
120 
126  UINT getStartIndex() const { return startIndex; }
127 
133  UINT getEndIndex() const { return endIndex; }
134 
140  UINT getLength() const { return endIndex-startIndex+1; }
141 
147  UINT getClassLabel() const { return classLabel; }
148 
149 protected:
150  UINT startIndex;
151  UINT endIndex;
152  UINT classLabel;
153 };
154 
155 GRT_END_NAMESPACE
156 
157 #endif //GRT_TIME_SERIES_POSITION_TRACKER_HEADER
TimeSeriesPositionTracker & operator=(const TimeSeriesPositionTracker &rhs)
TimeSeriesPositionTracker(const TimeSeriesPositionTracker &rhs)
void setTracker(UINT startIndex, UINT endIndex, UINT classLabel)
TimeSeriesPositionTracker(UINT startIndex=0, UINT endIndex=0, UINT classLabel=0)