Orocos Real-Time Toolkit
2.8.3
|
A static allocated Vector. More...
#include <rtt/extras/MultiVector.hpp>
Public Types | |
enum | Size { size = S } |
The size of this MultiVector is stored in this enum. More... | |
typedef T | DataType[S] |
You can use DataType if you want to refer to a pointer holding S elements. More... | |
Public Member Functions | |
operator const T * () const | |
Returns a pointer to the data. More... | |
operator T & () | |
Returns a reference to the data. More... | |
MultiVector (const T d) | |
Creates a vector with all elements initialized to d. More... | |
MultiVector () | |
Creates a vector with all elements initialized to zero. More... | |
template<class Alloc > | |
MultiVector (const std::vector< T, Alloc > &vect) | |
Creates a vector from a std::vector. More... | |
MultiVector & | operator+= (const MultiVector &d) |
Adds another MultiVector to this MultiVector. More... | |
MultiVector & | operator*= (const MultiVector &d) |
Vector product of another MultiVector with this MultiVector. More... | |
MultiVector & | operator*= (const T d) |
Scalar product of a scalar with this MultiVector. More... | |
MultiVector | operator- (const MultiVector &d) const |
Returns the difference between this and another MultiVector. More... | |
MultiVector | operator- () const |
MultiVector | operator+ (const MultiVector &d) const |
Returns the addition of this and another MultiVector. More... | |
MultiVector | operator* (const MultiVector &d) const |
Returns the vector product of this and another MultiVector. More... | |
MultiVector | operator/ (const T d) const |
MultiVector | operator* (const T d) const |
Returns the scalar product of this and a scalar value. More... | |
MultiVector & | operator= (const MultiVector &d) |
Assigns all elements of this MultiVector to all elements of another MultiVector. More... | |
bool | operator== (const MultiVector &d) |
Compares all elements of this MultiVector to all elements of another MultiVector. More... | |
bool | operator!= (const MultiVector &d) |
Compares elements of this MultiVector are different from elements of another MultiVector. More... | |
template<class Alloc > | |
void | getVector (std::vector< T, Alloc > &vect) const |
Return the contents of this MultiVector as an std::vector Resizes vect to the size of this MultiVector. More... | |
template<class Alloc > | |
bool | setVector (const std::vector< T, Alloc > &vect) |
Set the contents of this MultiVector from an std::vector. More... | |
MultiVector & | operator= (const T d) |
Assigns a scalar value to all elements of this Multivector and returns a reference of the result. More... | |
T & | operator[] (unsigned int i) |
Not checked index operator to the internal data. More... | |
Public Attributes | |
DataType | data |
The data contained in the MultiVector. More... | |
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.
S | The number of elements in the vector |
T | The type of all elements in the vector |
Definition at line 72 of file MultiVector.hpp.
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 MultiVector.hpp.
enum RTT::extras::MultiVector::Size |
The size of this MultiVector is stored in this enum.
Enumerator | |
---|---|
size |
Definition at line 77 of file MultiVector.hpp.
|
inline |
Creates a vector with all elements initialized to d.
d | The value to be used for initialisation of all elements |
Definition at line 113 of file MultiVector.hpp.
|
inline |
Creates a vector with all elements initialized to zero.
Definition at line 122 of file MultiVector.hpp.
|
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 MultiVector.hpp.
|
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 MultiVector.hpp.
|
inline |
Returns a pointer to the data.
Definition at line 94 of file MultiVector.hpp.
References RTT::extras::MultiVector< S, T >::data.
|
inline |
Returns a reference to the data.
Definition at line 102 of file MultiVector.hpp.
References RTT::extras::MultiVector< S, T >::data.
|
inline |
Compares elements of this MultiVector are different from elements of another MultiVector.
d | The other MultiVector to be used. |
Definition at line 307 of file MultiVector.hpp.
References RTT::extras::MultiVector< S, T >::data.
|
inline |
Returns the vector product of this and another MultiVector.
d | The other MultiVector to be used. |
Definition at line 234 of file MultiVector.hpp.
References RTT::extras::MultiVector< S, T >::data.
|
inline |
Returns the scalar product of this and a scalar value.
d | The scalar |
Definition at line 260 of file MultiVector.hpp.
|
inline |
Vector product of another MultiVector with this MultiVector.
d | The other MultiVector to be used. |
Definition at line 164 of file MultiVector.hpp.
References RTT::extras::MultiVector< S, T >::data.
|
inline |
Scalar product of a scalar with this MultiVector.
d | The scalar |
Definition at line 178 of file MultiVector.hpp.
|
inline |
Returns the addition of this and another MultiVector.
d | The other MultiVector to be used. |
Definition at line 218 of file MultiVector.hpp.
References RTT::extras::MultiVector< S, T >::data.
|
inline |
Adds another MultiVector to this MultiVector.
d | The other MultiVector to be used. |
Definition at line 150 of file MultiVector.hpp.
References RTT::extras::MultiVector< S, T >::data.
|
inline |
Returns the difference between this and another MultiVector.
d | The other MultiVector to be used. |
Definition at line 192 of file MultiVector.hpp.
References RTT::extras::MultiVector< S, T >::data.
|
inline |
Definition at line 202 of file MultiVector.hpp.
References RTT::extras::MultiVector< S, T >::data.
|
inline |
Definition at line 244 of file MultiVector.hpp.
|
inline |
Assigns all elements of this MultiVector to all elements of another MultiVector.
d | The other MultiVector to be used. |
Definition at line 277 of file MultiVector.hpp.
References RTT::extras::MultiVector< S, T >::data.
|
inline |
Assigns a scalar value to all elements of this Multivector and returns a reference of the result.
d | The scalar |
Definition at line 364 of file MultiVector.hpp.
|
inline |
Compares all elements of this MultiVector to all elements of another MultiVector.
d | The other MultiVector to be used. |
Definition at line 292 of file MultiVector.hpp.
References RTT::extras::MultiVector< S, T >::data.
|
inline |
Not checked index operator to the internal data.
i | The element to be accessed starting from zero. |
Definition at line 379 of file MultiVector.hpp.
|
inline |
Set the contents of this MultiVector from an std::vector.
Definition at line 332 of file MultiVector.hpp.
DataType RTT::extras::MultiVector< S, T >::data |
The data contained in the MultiVector.
You can access it freely.
Definition at line 89 of file MultiVector.hpp.
Referenced by RTT::extras::MultiVector< S, T >::operator const T *(), RTT::extras::MultiVector< S, T >::operator T &(), RTT::extras::MultiVector< S, T >::operator!=(), RTT::extras::MultiVector< S, T >::operator*(), RTT::extras::MultiVector< S, T >::operator*=(), RTT::extras::MultiVector< S, T >::operator+(), RTT::extras::MultiVector< S, T >::operator+=(), RTT::extras::MultiVector< S, T >::operator-(), RTT::extras::MultiVector< S, T >::operator=(), and RTT::extras::MultiVector< S, T >::operator==().