GestureRecognitionToolkit  Version: 0.2.0
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
TimeSeriesClassificationSampleTrimmer.h
Go to the documentation of this file.
1 
23 /*
24  GRT MIT License
25  Copyright (c) <2012> <Nicholas Gillian, Media Lab, MIT>
26 
27  Permission is hereby granted, free of charge, to any person obtaining a copy of this software
28  and associated documentation files (the "Software"), to deal in the Software without restriction,
29  including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
30  and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
31  subject to the following conditions:
32 
33  The above copyright notice and this permission notice shall be included in all copies or substantial
34  portions of the Software.
35 
36  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
37  LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
38  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
39  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
40  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41  */
42 
43 #ifndef GRT_TIME_SERIES_TRIMMER_HEADER
44 #define GRT_TIME_SERIES_TRIMMER_HEADER
45 
46 #include "../DataStructures/TimeSeriesClassificationData.h"
47 
48 GRT_BEGIN_NAMESPACE
49 
51 public:
52 
56  TimeSeriesClassificationSampleTrimmer(Float trimThreshold=0.1,Float maximumTrimPercentage=80);
57 
62 
70  if( this != &rhs){
71  this->trimThreshold = rhs.trimThreshold;
72  this->maximumTrimPercentage = rhs.maximumTrimPercentage;
73  this->debugLog = rhs.debugLog;
74  this->warningLog = rhs.warningLog;
75  this->errorLog = rhs.errorLog;
76  }
77  return *this;
78  }
79 
94  bool trimTimeSeries(TimeSeriesClassificationSample &timeSeries);
95 
96 protected:
97  Float trimThreshold;
98  Float maximumTrimPercentage;
99  DebugLog debugLog;
100  WarningLog warningLog;
101  ErrorLog errorLog;
102 
103 };
104 
105 GRT_END_NAMESPACE
106 
107 #endif // GRT_TIME_SERIES_TRIMMER_HEADER