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.
|
#include <GRTBase.h>
Public Member Functions | |
GRTBase (const std::string &id="") | |
virtual | ~GRTBase (void) |
bool | copyGRTBaseVariables (const GRTBase *GRTBase) |
GRT_DEPRECATED_MSG ("getClassType is deprecated, use getId() instead!", std::string getClassType() const ) | |
std::string | getId () const |
std::string | getLastWarningMessage () const |
std::string | getLastErrorMessage () const |
std::string | getLastInfoMessage () const |
bool | setInfoLoggingEnabled (const bool loggingEnabled) |
bool | setWarningLoggingEnabled (const bool loggingEnabled) |
bool | setErrorLoggingEnabled (const bool loggingEnabled) |
bool | setDebugLoggingEnabled (const bool loggingEnabled) |
GRTBase * | getGRTBasePointer () |
const GRTBase * | getGRTBasePointer () const |
Float | scale (const Float &x, const Float &minSource, const Float &maxSource, const Float &minTarget, const Float &maxTarget, const bool constrain=false) |
Float | SQR (const Float &x) const |
Static Public Member Functions | |
static std::string | getGRTVersion (bool returnRevision=true) |
static std::string | getGRTRevison () |
Protected Attributes | |
std::string | classId |
Stores the name of the class (e.g., MinDist) | |
DebugLog | debugLog |
ErrorLog | errorLog |
InfoLog | infoLog |
WarningLog | warningLog |
GRT MIT License Copyright (c) <2012> <Nicholas Gillian, Media Lab, MIT>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
GRT_BEGIN_NAMESPACE GRTBase::GRTBase | ( | const std::string & | id = "" | ) |
Default GRTBase Constructor
id | a string representing the class ID of the inheriting type |
Definition at line 26 of file GRTBase.cpp.
|
virtual |
Default GRTBase Destructor
Definition at line 40 of file GRTBase.cpp.
bool GRTBase::copyGRTBaseVariables | ( | const GRTBase * | GRTBase | ) |
This copies the GRTBase variables from the GRTBase pointer to the instance that calls the function.
const | GRTBase *GRTBase: a pointer to a GRTBase from which the values will be copied to the instance that calls the function |
Definition at line 43 of file GRTBase.cpp.
GRTBase * GRTBase::getGRTBasePointer | ( | ) |
This functions returns a pointer to the current instance.
Definition at line 89 of file GRTBase.cpp.
const GRTBase * GRTBase::getGRTBasePointer | ( | ) | const |
This functions returns a const pointer to the current instance.
Definition at line 93 of file GRTBase.cpp.
|
static |
This functions returns the current GRT revision as a std::string.
Definition at line 77 of file GRTBase.cpp.
|
static |
This functions the GRT version number and revision as a std::string. If you do not want the revision number then set the returnRevision parameter to false.
returnRevision | sets if the revision number should be added to the std::string that is returned. Default value is true. |
Definition at line 71 of file GRTBase.cpp.
std::string GRTBase::getId | ( | ) | const |
Gets the id of the class that is inheriting from this base class, e.g., if the KNN Classifier class inherits from Classifier, which inherits from MLBase, which inherits from GRTBase, then the classId will be the id of the KNN class
Definition at line 85 of file GRTBase.cpp.
std::string GRTBase::getLastErrorMessage | ( | ) | const |
This function returns the last error message as a std::string. If no errors have occured, the std::string will be empty.
Definition at line 63 of file GRTBase.cpp.
std::string GRTBase::getLastInfoMessage | ( | ) | const |
This function returns the last info message as a std::string. If no info have occured, the std::string will be empty.
Definition at line 67 of file GRTBase.cpp.
std::string GRTBase::getLastWarningMessage | ( | ) | const |
This function returns the last warning message as a std::string. If no warnings have occured, the std::string will be empty.
Definition at line 59 of file GRTBase.cpp.
GRTBase::GRT_DEPRECATED_MSG | ( | "getClassType is | deprecated, |
use getId() instead!" | , | ||
std::string getClassType() | const | ||
) |
return returns a std::string representing the class type
|
inline |
Scales the input value x (which should be in the range [minSource maxSource]) to a value in the new target range of [minTarget maxTarget].
x | the value that should be scaled |
minSource | the minimum range that x originates from |
maxSource | the maximum range that x originates from |
minTarget | the minimum range that x should be scaled to |
maxTarget | the maximum range that x should be scaled to |
constrain | sets if the scaled value should be constrained to the target range |
bool GRTBase::setDebugLoggingEnabled | ( | const bool | loggingEnabled | ) |
Sets if debug logging is enabled/disabled for this specific instance. If you want to enable/disable error logging globally, then you should use the DebugLog::enableLogging( bool ) function.
Definition at line 109 of file GRTBase.cpp.
bool GRTBase::setErrorLoggingEnabled | ( | const bool | loggingEnabled | ) |
Sets if error logging is enabled/disabled for this specific instance. If you want to enable/disable error logging globally, then you should use the ErrorLog::enableLogging( bool ) function.
Definition at line 105 of file GRTBase.cpp.
bool GRTBase::setInfoLoggingEnabled | ( | const bool | loggingEnabled | ) |
Sets if info logging is enabled/disabled for this specific instance. If you want to enable/disable info logging globally, then you should use the InfoLog::enableLogging( bool ) function.
Definition at line 97 of file GRTBase.cpp.
bool GRTBase::setWarningLoggingEnabled | ( | const bool | loggingEnabled | ) |
Sets if warning logging is enabled/disabled for this specific instance. If you want to enable/disable warning logging globally, then you should use the WarningLog::enableLogging( bool ) function.
Definition at line 101 of file GRTBase.cpp.