RTT::extras::MultiVector< S, T > Struct Template Reference

A static allocated Vector. More...

#include <MultiVector.hpp>

List of all members.

Public Types

typedef T DataType [S]
typedef T DataType [S]
enum  Size { size = S, size = S }
enum  Size { size = S, size = S }

Public Member Functions

template<class Alloc >
void getVector (std::vector< T, Alloc > &vect) const
template<class Alloc >
void getVector (std::vector< T, Alloc > &vect) const
template<class Alloc >
 MultiVector (const std::vector< T, Alloc > &vect)
 MultiVector ()
 MultiVector (const T d)
template<class Alloc >
 MultiVector (const std::vector< T, Alloc > &vect)
 MultiVector ()
 MultiVector (const T d)
 operator const T * () const
 operator const T * () const
 operator T & ()
 operator T & ()
bool operator!= (const MultiVector &d)
bool operator!= (const MultiVector &d)
MultiVector operator* (const T d) const
MultiVector operator* (const MultiVector &d) const
MultiVector operator* (const T d) const
MultiVector operator* (const MultiVector &d) const
MultiVectoroperator*= (const T d)
MultiVectoroperator*= (const MultiVector &d)
MultiVectoroperator*= (const T d)
MultiVectoroperator*= (const MultiVector &d)
MultiVector operator+ (const MultiVector &d) const
MultiVector operator+ (const MultiVector &d) const
MultiVectoroperator+= (const MultiVector &d)
MultiVectoroperator+= (const MultiVector &d)
MultiVector operator- () const
MultiVector operator- (const MultiVector &d) const
MultiVector operator- () const
MultiVector operator- (const MultiVector &d) const
MultiVector operator/ (const T d) const
MultiVector operator/ (const T d) const
MultiVectoroperator= (const T d)
MultiVectoroperator= (const MultiVector &d)
MultiVectoroperator= (const T d)
MultiVectoroperator= (const MultiVector &d)
bool operator== (const MultiVector &d)
bool operator== (const MultiVector &d)
T & operator[] (unsigned int i)
T & operator[] (unsigned int i)
template<class Alloc >
bool setVector (const std::vector< T, Alloc > &vect)
template<class Alloc >
bool setVector (const std::vector< T, Alloc > &vect)

Public Attributes

DataType data

Detailed Description

template<unsigned S = 6, class T = double>
struct RTT::extras::MultiVector< S, T >

A static allocated Vector.

The MultiVector is an n (defaults to 6) dimensional vector of any type T, mostly used for holding primitive types. Most common casting and operators are defined on this class.

Parameters:
S The number of elements in the vector
T The type of all elements in the vector

Definition at line 72 of file install/include/rtt/extras/MultiVector.hpp.


Member Typedef Documentation

template<unsigned S = 6, class T = double>
typedef T RTT::extras::MultiVector< S, T >::DataType[S]

You can use DataType if you want to refer to a pointer holding S elements

Definition at line 83 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
typedef T RTT::extras::MultiVector< S, T >::DataType[S]

You can use DataType if you want to refer to a pointer holding S elements

Definition at line 83 of file install/include/rtt/extras/MultiVector.hpp.


Member Enumeration Documentation

template<unsigned S = 6, class T = double>
enum RTT::extras::MultiVector::Size

The size of this MultiVector is stored in this enum.

Enumerator:
size 
size 

Definition at line 77 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
enum RTT::extras::MultiVector::Size

The size of this MultiVector is stored in this enum.

Enumerator:
size 
size 

Definition at line 77 of file install/include/rtt/extras/MultiVector.hpp.


Constructor & Destructor Documentation

template<unsigned S = 6, class T = double>
RTT::extras::MultiVector< S, T >::MultiVector ( const T  d  )  [inline]

Creates a vector with all elements initialized to d.

Parameters:
d The value to be used for initialisation of all elements

Definition at line 113 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
RTT::extras::MultiVector< S, T >::MultiVector (  )  [inline]

Creates a vector with all elements initialized to zero

Definition at line 122 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
template<class Alloc >
RTT::extras::MultiVector< S, T >::MultiVector ( const std::vector< T, Alloc > &  vect  )  [inline]

Creates a vector from a std::vector. If there are more items in vect than the size of this Multivector, they are ignored, if there are less items in vect, the remainder is filled with zeros.

Definition at line 135 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
RTT::extras::MultiVector< S, T >::MultiVector ( const T  d  )  [inline]

Creates a vector with all elements initialized to d.

Parameters:
d The value to be used for initialisation of all elements

Definition at line 113 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
RTT::extras::MultiVector< S, T >::MultiVector (  )  [inline]

Creates a vector with all elements initialized to zero

Definition at line 122 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
template<class Alloc >
RTT::extras::MultiVector< S, T >::MultiVector ( const std::vector< T, Alloc > &  vect  )  [inline]

Creates a vector from a std::vector. If there are more items in vect than the size of this Multivector, they are ignored, if there are less items in vect, the remainder is filled with zeros.

Definition at line 135 of file rtt/extras/MultiVector.hpp.


Member Function Documentation

template<unsigned S = 6, class T = double>
template<class Alloc >
void RTT::extras::MultiVector< S, T >::getVector ( std::vector< T, Alloc > &  vect  )  const [inline]

Return the contents of this MultiVector as an std::vector Resizes vect to the size of this MultiVector.

Definition at line 320 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
template<class Alloc >
void RTT::extras::MultiVector< S, T >::getVector ( std::vector< T, Alloc > &  vect  )  const [inline]

Return the contents of this MultiVector as an std::vector Resizes vect to the size of this MultiVector.

Definition at line 320 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
RTT::extras::MultiVector< S, T >::operator const T * (  )  const [inline]

Returns a pointer to the data.

Definition at line 94 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
RTT::extras::MultiVector< S, T >::operator const T * (  )  const [inline]

Returns a pointer to the data.

Definition at line 94 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
RTT::extras::MultiVector< S, T >::operator T & (  )  [inline]

Returns a reference to the data.

Definition at line 102 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
RTT::extras::MultiVector< S, T >::operator T & (  )  [inline]

Returns a reference to the data.

Definition at line 102 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
bool RTT::extras::MultiVector< S, T >::operator!= ( const MultiVector< S, T > &  d  )  [inline]

Compares elements of this MultiVector are different from elements of another MultiVector.

Parameters:
d The other MultiVector to be used.

Definition at line 307 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
bool RTT::extras::MultiVector< S, T >::operator!= ( const MultiVector< S, T > &  d  )  [inline]

Compares elements of this MultiVector are different from elements of another MultiVector.

Parameters:
d The other MultiVector to be used.

Definition at line 307 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector RTT::extras::MultiVector< S, T >::operator* ( const T  d  )  const [inline]

Returns the scalar product of this and a scalar value

Parameters:
d The scalar

Definition at line 260 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector RTT::extras::MultiVector< S, T >::operator* ( const MultiVector< S, T > &  d  )  const [inline]

Returns the vector product of this and another MultiVector

Parameters:
d The other MultiVector to be used.

Definition at line 234 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector RTT::extras::MultiVector< S, T >::operator* ( const T  d  )  const [inline]

Returns the scalar product of this and a scalar value

Parameters:
d The scalar

Definition at line 260 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector RTT::extras::MultiVector< S, T >::operator* ( const MultiVector< S, T > &  d  )  const [inline]

Returns the vector product of this and another MultiVector

Parameters:
d The other MultiVector to be used.

Definition at line 234 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector& RTT::extras::MultiVector< S, T >::operator*= ( const T  d  )  [inline]

Scalar product of a scalar with this MultiVector

Parameters:
d The scalar

Definition at line 178 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector& RTT::extras::MultiVector< S, T >::operator*= ( const MultiVector< S, T > &  d  )  [inline]

Vector product of another MultiVector with this MultiVector

Parameters:
d The other MultiVector to be used.

Definition at line 164 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector& RTT::extras::MultiVector< S, T >::operator*= ( const T  d  )  [inline]

Scalar product of a scalar with this MultiVector

Parameters:
d The scalar

Definition at line 178 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector& RTT::extras::MultiVector< S, T >::operator*= ( const MultiVector< S, T > &  d  )  [inline]

Vector product of another MultiVector with this MultiVector

Parameters:
d The other MultiVector to be used.

Definition at line 164 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector RTT::extras::MultiVector< S, T >::operator+ ( const MultiVector< S, T > &  d  )  const [inline]

Returns the addition of this and another MultiVector

Parameters:
d The other MultiVector to be used.

Definition at line 218 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector RTT::extras::MultiVector< S, T >::operator+ ( const MultiVector< S, T > &  d  )  const [inline]

Returns the addition of this and another MultiVector

Parameters:
d The other MultiVector to be used.

Definition at line 218 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector& RTT::extras::MultiVector< S, T >::operator+= ( const MultiVector< S, T > &  d  )  [inline]

Adds another MultiVector to this MultiVector

Parameters:
d The other MultiVector to be used.

Definition at line 150 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector& RTT::extras::MultiVector< S, T >::operator+= ( const MultiVector< S, T > &  d  )  [inline]

Adds another MultiVector to this MultiVector

Parameters:
d The other MultiVector to be used.

Definition at line 150 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector RTT::extras::MultiVector< S, T >::operator- (  )  const [inline]

Definition at line 202 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector RTT::extras::MultiVector< S, T >::operator- ( const MultiVector< S, T > &  d  )  const [inline]

Returns the difference between this and another MultiVector

Parameters:
d The other MultiVector to be used.

Definition at line 192 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector RTT::extras::MultiVector< S, T >::operator- (  )  const [inline]

Definition at line 202 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector RTT::extras::MultiVector< S, T >::operator- ( const MultiVector< S, T > &  d  )  const [inline]

Returns the difference between this and another MultiVector

Parameters:
d The other MultiVector to be used.

Definition at line 192 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector RTT::extras::MultiVector< S, T >::operator/ ( const T  d  )  const [inline]

Definition at line 244 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector RTT::extras::MultiVector< S, T >::operator/ ( const T  d  )  const [inline]

Definition at line 244 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector& RTT::extras::MultiVector< S, T >::operator= ( const T  d  )  [inline]

Assigns a scalar value to all elements of this Multivector and returns a reference of the result.

Parameters:
d The scalar

Definition at line 364 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector& RTT::extras::MultiVector< S, T >::operator= ( const MultiVector< S, T > &  d  )  [inline]

Assigns all elements of this MultiVector to all elements of another MultiVector.

Parameters:
d The other MultiVector to be used.

Definition at line 277 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector& RTT::extras::MultiVector< S, T >::operator= ( const T  d  )  [inline]

Assigns a scalar value to all elements of this Multivector and returns a reference of the result.

Parameters:
d The scalar

Definition at line 364 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
MultiVector& RTT::extras::MultiVector< S, T >::operator= ( const MultiVector< S, T > &  d  )  [inline]

Assigns all elements of this MultiVector to all elements of another MultiVector.

Parameters:
d The other MultiVector to be used.

Definition at line 277 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
bool RTT::extras::MultiVector< S, T >::operator== ( const MultiVector< S, T > &  d  )  [inline]

Compares all elements of this MultiVector to all elements of another MultiVector.

Parameters:
d The other MultiVector to be used.

Definition at line 292 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
bool RTT::extras::MultiVector< S, T >::operator== ( const MultiVector< S, T > &  d  )  [inline]

Compares all elements of this MultiVector to all elements of another MultiVector.

Parameters:
d The other MultiVector to be used.

Definition at line 292 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
T& RTT::extras::MultiVector< S, T >::operator[] ( unsigned int  i  )  [inline]

Not checked index operator to the internal data

Parameters:
i The element to be accessed starting from zero.

Definition at line 379 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
T& RTT::extras::MultiVector< S, T >::operator[] ( unsigned int  i  )  [inline]

Not checked index operator to the internal data

Parameters:
i The element to be accessed starting from zero.

Definition at line 379 of file install/include/rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
template<class Alloc >
bool RTT::extras::MultiVector< S, T >::setVector ( const std::vector< T, Alloc > &  vect  )  [inline]

Set the contents of this MultiVector from an std::vector

Returns:
false if vect has wrong size.

Definition at line 332 of file rtt/extras/MultiVector.hpp.

template<unsigned S = 6, class T = double>
template<class Alloc >
bool RTT::extras::MultiVector< S, T >::setVector ( const std::vector< T, Alloc > &  vect  )  [inline]

Set the contents of this MultiVector from an std::vector

Returns:
false if vect has wrong size.

Definition at line 332 of file install/include/rtt/extras/MultiVector.hpp.


Member Data Documentation

template<unsigned S = 6, class T = double>
DataType RTT::extras::MultiVector< S, T >::data

The data contained in the MultiVector. You can access it freely.

Definition at line 89 of file install/include/rtt/extras/MultiVector.hpp.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Jan 11 09:49:56 2013