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.
|
Public Member Functions | |
GRT_API | VectorFloat () |
GRT_API | VectorFloat (const size_type size) |
GRT_API | VectorFloat (const size_type size, const Float &value) |
GRT_API | VectorFloat (const VectorFloat &rhs) |
virtual GRT_API | ~VectorFloat () |
GRT_API VectorFloat & | operator= (const VectorFloat &rhs) |
GRT_API VectorFloat & | operator= (const Vector< Float > &rhs) |
GRT_API VectorFloat & | operator= (const vector< VectorFloat > &rhs) |
GRT_API bool | save (const std::string &filename) const |
GRT_API bool | load (const std::string &filename, const char seperator= ',') |
GRT_API bool | print (const std::string title="") const |
GRT_API bool | scale (const Float minTarget, const Float maxTarget, const bool constrain=true) |
GRT_API bool | scale (const Float minSource, const Float maxSource, const Float minTarget, const Float maxTarget, const bool constrain=true) |
GRT_API Float | getMinValue () const |
GRT_API Float | getMaxValue () const |
GRT_API Float | getMean () const |
GRT_API Float | getStdDev () const |
GRT_API MinMax | getMinMax () const |
Public Member Functions inherited from Vector< Float > | |
Vector (const unsigned int size=0) | |
Vector (const unsigned int size, const Float &value) | |
Vector (const Vector &rhs) | |
Vector (const std::vector< Float > &rhs) | |
virtual | ~Vector () |
Vector & | operator= (const Vector &rhs) |
Vector & | operator= (const std::vector< Float > &rhs) |
virtual bool | resize (const unsigned int size) |
virtual bool | resize (const unsigned int size, const Float &value) |
virtual bool | copy (const Vector< Float > &rhs) |
bool | fill (const Float &value) |
bool | setAll (const Float &value) |
UINT | getSize () const |
Float * | getData () |
const Float * | getData () const |
Protected Attributes | |
WarningLog | warningLog |
ErrorLog | errorLog |
Definition at line 33 of file VectorFloat.h.
GRT_BEGIN_NAMESPACE VectorFloat::VectorFloat | ( | ) |
Default Constructor
Definition at line 27 of file VectorFloat.cpp.
VectorFloat::VectorFloat | ( | const size_type | size | ) |
Constructor, sets the size of the vector
size | sets the size of the vector |
Definition at line 32 of file VectorFloat.cpp.
VectorFloat::VectorFloat | ( | const size_type | size, |
const Float & | value | ||
) |
Constructor, sets the size of the vector and sets all elements to value
size | sets the size of the vector |
value | the value that will be written to all elements in the vector |
Definition at line 38 of file VectorFloat.cpp.
VectorFloat::VectorFloat | ( | const VectorFloat & | rhs | ) |
Copy Constructor, copies the values from the rhs VectorFloat to this VectorFloat instance
rhs | the VectorFloat from which the values will be copied |
Definition at line 44 of file VectorFloat.cpp.
|
virtual |
Destructor, cleans up any memory
Definition at line 49 of file VectorFloat.cpp.
Float VectorFloat::getMaxValue | ( | ) | const |
Definition at line 124 of file VectorFloat.cpp.
Float VectorFloat::getMean | ( | ) | const |
Definition at line 134 of file VectorFloat.cpp.
MinMax VectorFloat::getMinMax | ( | ) | const |
Definition at line 162 of file VectorFloat.cpp.
Float VectorFloat::getMinValue | ( | ) | const |
Definition at line 114 of file VectorFloat.cpp.
Float VectorFloat::getStdDev | ( | ) | const |
Definition at line 147 of file VectorFloat.cpp.
bool VectorFloat::load | ( | const std::string & | filename, |
const char | seperator = ',' |
||
) |
Loads a vector from a CSV file. This assumes that the data has been saved as rows and columns in the CSV file and that there are an equal number of columns per row.
This replaces the deprecated loadFromCSVFile function.
filename | the name of the CSV file |
Definition at line 204 of file VectorFloat.cpp.
VectorFloat & VectorFloat::operator= | ( | const VectorFloat & | rhs | ) |
Defines how the data from the rhs VectorFloat should be copied to this VectorFloat
rhs | another instance of a VectorFloat |
Definition at line 53 of file VectorFloat.cpp.
VectorFloat & VectorFloat::operator= | ( | const Vector< Float > & | rhs | ) |
Defines how the data from the rhs Vector< Float > should be copied to this VectorFloat
rhs | an instance of a Vector< Float > |
Definition at line 64 of file VectorFloat.cpp.
GRT_API VectorFloat& VectorFloat::operator= | ( | const vector< VectorFloat > & | rhs | ) |
Defines how the data from the rhs vector of VectorFloats should be copied to this VectorFloat
rhs | a vector of VectorFloats |
bool VectorFloat::print | ( | const std::string | title = "" | ) | const |
Prints the VectorFloat contents to std::cout
title | sets the title of the data that will be printed to std::cout |
Definition at line 75 of file VectorFloat.cpp.
bool VectorFloat::save | ( | const std::string & | filename | ) | const |
Saves the vector to a CSV file. This replaces the deprecated saveToCSVFile function.
filename | the name of the CSV file |
Definition at line 178 of file VectorFloat.cpp.
bool VectorFloat::scale | ( | const Float | minTarget, |
const Float | maxTarget, | ||
const bool | constrain = true |
||
) |
Scales the vector to a new range given by the min and max targets, this uses the minimum and maximum values in the existing vector as the minSource and maxSource for min-max scaling.
Definition at line 90 of file VectorFloat.cpp.
bool VectorFloat::scale | ( | const Float | minSource, |
const Float | maxSource, | ||
const Float | minTarget, | ||
const Float | maxTarget, | ||
const bool | constrain = true |
||
) |
Scales the vector to a new range given by the min and max targets using the ranges as the source ranges.
Definition at line 97 of file VectorFloat.cpp.