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.
Vector< T > Class Template Reference
Inheritance diagram for Vector< T >:

Public Member Functions

 Vector (const unsigned int size=0)
 
 Vector (const unsigned int size, const T &value)
 
 Vector (const Vector &rhs)
 
 Vector (const std::vector< T > &rhs)
 
virtual ~Vector ()
 
Vectoroperator= (const Vector &rhs)
 
Vectoroperator= (const std::vector< T > &rhs)
 
virtual bool resize (const unsigned int size)
 
virtual bool resize (const unsigned int size, const T &value)
 
virtual bool copy (const Vector< T > &rhs)
 
bool fill (const T &value)
 
bool setAll (const T &value)
 
UINT getSize () const
 
T * getData ()
 
const T * getData () const
 

Detailed Description

template<class T>
class Vector< T >

Definition at line 41 of file Vector.h.

Constructor & Destructor Documentation

template<class T>
Vector< T >::Vector ( const unsigned int  size = 0)
inline

Default Constructor Constructor, sets the size of the vector

Parameters
sizethe size of the vector

Definition at line 53 of file Vector.h.

template<class T>
Vector< T >::Vector ( const unsigned int  size,
const T &  value 
)
inline

Constructor, sets the size of the vector and sets all elements to value

Parameters
sizethe size of the vector

Definition at line 60 of file Vector.h.

template<class T>
Vector< T >::Vector ( const Vector< T > &  rhs)
inline

Copy Constructor, copies the values from the rhs Vector to this Vector instance

Parameters
rhsthe Vector from which the values will be copied

Definition at line 67 of file Vector.h.

template<class T>
Vector< T >::Vector ( const std::vector< T > &  rhs)
inline

Copy Constructor, copies the values from the rhs std::vector to this Vector instance

Parameters
rhsthe base class instance from which the values will be copied

Definition at line 80 of file Vector.h.

template<class T>
virtual Vector< T >::~Vector ( )
inlinevirtual

Destructor, cleans up any memory

Definition at line 91 of file Vector.h.

Member Function Documentation

template<class T>
virtual bool Vector< T >::copy ( const Vector< T > &  rhs)
inlinevirtual

Copies the data from the rhs vector to this vector.

Parameters
rhsthe vector you want to copy into this vector
Returns
returns true or false, indicating if the copy was successful

Definition at line 156 of file Vector.h.

template<class T>
bool Vector< T >::fill ( const T &  value)
inline

Sets all the values in the Vector to the input value

Parameters
valuethe value you want to set all the Vector values to
Returns
returns true or false, indicating if the set was successful

Definition at line 175 of file Vector.h.

template<class T>
T* Vector< T >::getData ( )
inline

Gets a pointer to the first element in the vector

Returns
returns a pointer to the raw data

Definition at line 208 of file Vector.h.

template<class T>
const T* Vector< T >::getData ( ) const
inline

Gets a pointer to the first element in the vector

Returns
returns a pointer to the raw data

Definition at line 218 of file Vector.h.

template<class T>
UINT Vector< T >::getSize ( ) const
inline

Gets the size of the Vector

Returns
returns the size of the Vector

Definition at line 201 of file Vector.h.

template<class T>
Vector& Vector< T >::operator= ( const Vector< T > &  rhs)
inline

Defines how the data from the rhs Vector should be copied to this Vector

Parameters
rhsanother instance of a Vector
Returns
returns a reference to this instance of the Vector

Definition at line 99 of file Vector.h.

template<class T>
Vector& Vector< T >::operator= ( const std::vector< T > &  rhs)
inline

Defines how the data from the rhs std::vector instance should be copied to this Vector

Parameters
rhsanother instance of a Vector
Returns
returns a reference to this instance of the Vector

Definition at line 116 of file Vector.h.

template<class T>
virtual bool Vector< T >::resize ( const unsigned int  size)
inlinevirtual

Defines how the vector should be resized

Parameters
sizethe new size of the vector
Returns
returns true if the vector was resized correctly, false otherwise

Definition at line 133 of file Vector.h.

template<class T>
virtual bool Vector< T >::resize ( const unsigned int  size,
const T &  value 
)
inlinevirtual

Defines how the vector should be resized, this will also set all the values in the vector to [value]

Parameters
sizethe new size of the vector
valuethe value that will be copied to all elements in the vector
Returns
returns true if the vector was resized correctly, false otherwise

Definition at line 145 of file Vector.h.

template<class T>
bool Vector< T >::setAll ( const T &  value)
inline

Sets all the values in the Vector to the input value

Parameters
valuethe value you want to set all the Vector values to
Returns
returns true or false, indicating if the set was successful

Definition at line 192 of file Vector.h.


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