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.
GRTBase Class Reference

#include <GRTBase.h>

Inheritance diagram for GRTBase:
ClassificationData FastFourierTransform MLBase BernoulliRBM Classifier Clusterer Context ContinuousHiddenMarkovModel DiscreteHiddenMarkovModel EvolutionaryAlgorithm< INDIVIDUAL > FeatureExtraction GestureRecognitionPipeline GridSearch< T > LinearLeastSquares MeanShift MovementDetector Node PostProcessing PreProcessing PrincipalComponentAnalysis Regressifier Tree

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)
 
GRTBasegetGRTBasePointer ()
 
const GRTBasegetGRTBasePointer () 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
 

Detailed Description

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.

Definition at line 52 of file GRTBase.h.

Constructor & Destructor Documentation

GRT_BEGIN_NAMESPACE GRTBase::GRTBase ( const std::string &  id = "")

Default GRTBase Constructor

Parameters
ida string representing the class ID of the inheriting type

Definition at line 26 of file GRTBase.cpp.

GRTBase::~GRTBase ( void  )
virtual

Default GRTBase Destructor

Definition at line 40 of file GRTBase.cpp.

Member Function Documentation

bool GRTBase::copyGRTBaseVariables ( const GRTBase GRTBase)

This copies the GRTBase variables from the GRTBase pointer to the instance that calls the function.

Parameters
constGRTBase *GRTBase: a pointer to a GRTBase from which the values will be copied to the instance that calls the function
Returns
returns true if the copy was successfull, false otherwise

Definition at line 43 of file GRTBase.cpp.

GRTBase * GRTBase::getGRTBasePointer ( )

This functions returns a pointer to the current instance.

Returns
returns a GRTBase 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.

Returns
returns a const GRTBase pointer to the current instance.

Definition at line 93 of file GRTBase.cpp.

std::string GRTBase::getGRTRevison ( )
static

This functions returns the current GRT revision as a std::string.

Returns
returns the current GRT revision as a std::string.

Definition at line 77 of file GRTBase.cpp.

std::string GRTBase::getGRTVersion ( bool  returnRevision = true)
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.

Parameters
returnRevisionsets if the revision number should be added to the std::string that is returned. Default value is true.
Returns
returns the GRT version number and revision as a std::string.

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

Returns
returns a string representing the id of the inheriting 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.

Returns
returns the last error message as a std::string.

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.

Returns
returns the last info message as a std::string.

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.

Returns
returns the last warning message as a std::string.

Definition at line 59 of file GRTBase.cpp.

GRTBase::GRT_DEPRECATED_MSG ( "getClassType is  deprecated,
use getId() instead!"  ,
std::string getClassType()  const 
)
Deprecated:
use getId() instead This function returns the name of the current class as a std::string. For example, if you asked AdaBoost for the class type then this function would return "AdaBoost".

return returns a std::string representing the class type

Float GRTBase::scale ( const Float &  x,
const Float &  minSource,
const Float &  maxSource,
const Float &  minTarget,
const Float &  maxTarget,
const bool  constrain = false 
)
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].

Parameters
xthe value that should be scaled
minSourcethe minimum range that x originates from
maxSourcethe maximum range that x originates from
minTargetthe minimum range that x should be scaled to
maxTargetthe maximum range that x should be scaled to
constrainsets if the scaled value should be constrained to the target range
Returns
returns a new value that has been scaled based on the input parameters

Definition at line 184 of file GRTBase.h.

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.

Returns
returns true if the parameter was updated, false otherwise

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.

Returns
returns true if the parameter was updated, false otherwise

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.

Returns
returns true if the parameter was updated, false otherwise

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.

Returns
returns true if the parameter was updated, false otherwise

Definition at line 101 of file GRTBase.cpp.


The documentation for this class was generated from the following files: