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.
VectorFloat.h
1 /*
2 GRT MIT License
3 Copyright (c) <2012> <Nicholas Gillian, Media Lab, MIT>
4 
5 Permission is hereby granted, free of charge, to any person obtaining a copy of this software
6 and associated documentation files (the "Software"), to deal in the Software without restriction,
7 including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
9 subject to the following conditions:
10 
11 The above copyright notice and this permission notice shall be included in all copies or substantial
12 portions of the Software.
13 
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15 LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
17 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
18 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 */
20 
21 #ifndef GRT_VECTOR_FLOAT_HEADER
22 #define GRT_VECTOR_FLOAT_HEADER
23 
24 #include "..//Util/GRTTypedefs.h"
25 #include "Vector.h"
26 #include "../Util/MinMax.h"
27 #include "../Util/DebugLog.h"
28 #include "../Util/ErrorLog.h"
29 #include "../Util/WarningLog.h"
30 
31 GRT_BEGIN_NAMESPACE
32 
33 class VectorFloat : public Vector< Float >{
34 public:
38  GRT_API VectorFloat();
39 
45  GRT_API VectorFloat( const size_type size );
46 
53  GRT_API VectorFloat( const size_type size, const Float &value );
54 
60  GRT_API VectorFloat(const VectorFloat &rhs);
61 
65  GRT_API virtual ~VectorFloat();
66 
73  GRT_API VectorFloat& operator=(const VectorFloat &rhs);
74 
81  GRT_API VectorFloat& operator=(const Vector< Float > &rhs);
82 
89  GRT_API VectorFloat& operator=(const vector< VectorFloat > &rhs);
90 
97  GRT_API bool save(const std::string &filename) const;
98 
108  GRT_API bool load(const std::string &filename,const char seperator = ',');
109 
116  GRT_API bool print(const std::string title="") const;
117 
124  GRT_API bool scale(const Float minTarget,const Float maxTarget,const bool constrain = true);
125 
131  GRT_API bool scale(const Float minSource,const Float maxSource,const Float minTarget,const Float maxTarget,const bool constrain = true);
132 
136  GRT_API Float getMinValue() const;
137 
141  GRT_API Float getMaxValue() const;
142 
146  GRT_API Float getMean() const;
147 
151  GRT_API Float getStdDev() const;
152 
156  GRT_API MinMax getMinMax() const;
157 
158 protected:
159 
160  WarningLog warningLog;
161  ErrorLog errorLog;
162 
163 };
164 
165 GRT_END_NAMESPACE
166 
167 #endif //Header guard
GRT_API Float getMaxValue() const
The Vector class is a basic class for storing any type of data. The default Vector is an interface fo...
GRT_API bool save(const std::string &filename) const
GRT_API bool load(const std::string &filename, const char seperator= ',')
GRT_API Float getMinValue() const
GRT_API bool print(const std::string title="") const
Definition: VectorFloat.cpp:75
GRT_API VectorFloat & operator=(const VectorFloat &rhs)
Definition: VectorFloat.cpp:53
GRT_API VectorFloat()
Definition: VectorFloat.cpp:27
GRT_API bool scale(const Float minTarget, const Float maxTarget, const bool constrain=true)
Definition: VectorFloat.cpp:90
virtual GRT_API ~VectorFloat()
Definition: VectorFloat.cpp:49
Definition: MinMax.h:29
Definition: Vector.h:41
GRT_API Float getMean() const
GRT_API Float getStdDev() const
GRT_API MinMax getMinMax() const