GestureRecognitionToolkit
Version: 0.1.0
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
|
Public Member Functions | |
VectorFloat () | |
VectorFloat (const unsigned int size) | |
VectorFloat (const unsigned int size, const Float &value) | |
VectorFloat (const VectorFloat &rhs) | |
virtual | ~VectorFloat () |
VectorFloat & | operator= (const VectorFloat &rhs) |
VectorFloat & | operator= (const Vector< Float > &rhs) |
VectorFloat & | operator= (const vector< VectorFloat > &rhs) |
bool | save (const std::string &filename) const |
bool | load (const std::string &filename, const char seperator= ',') |
bool | print (const std::string title="") const |
bool | scale (const Float minTarget, const Float maxTarget, const bool constrain=true) |
bool | scale (const Float minSource, const Float maxSource, const Float minTarget, const Float maxTarget, const bool constrain=true) |
Float | getMinValue () const |
Float | getMaxValue () const |
Float | getMean () const |
Float | getStdDev () const |
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 | setAll (const Float &value) |
unsigned int | 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 26 of file VectorFloat.cpp.
VectorFloat::VectorFloat | ( | const unsigned int | size | ) |
Constructor, sets the size of the vector
size | sets the size of the vector |
Definition at line 31 of file VectorFloat.cpp.
VectorFloat::VectorFloat | ( | const unsigned int | 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 37 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 43 of file VectorFloat.cpp.
|
virtual |
Destructor, cleans up any memory
Definition at line 48 of file VectorFloat.cpp.
Float VectorFloat::getMaxValue | ( | ) | const |
Definition at line 123 of file VectorFloat.cpp.
Float VectorFloat::getMean | ( | ) | const |
Definition at line 133 of file VectorFloat.cpp.
MinMax VectorFloat::getMinMax | ( | ) | const |
Definition at line 161 of file VectorFloat.cpp.
Float VectorFloat::getMinValue | ( | ) | const |
Definition at line 113 of file VectorFloat.cpp.
Float VectorFloat::getStdDev | ( | ) | const |
Definition at line 146 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 203 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 52 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 63 of file VectorFloat.cpp.
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 74 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 177 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 89 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 96 of file VectorFloat.cpp.