Vector< N, T > Class Template Reference
[Utilities]

A vector. More...

#include <Vector.h>

Collaboration diagram for Vector< N, T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Vector ()
 Vector (T v)
 Vector (Vector< N, T > const &other)
get (size_t i) const
void set (size_t i, T v)
size_t getSize () const
T & at (size_t const i)
T & operator[] (size_t const i)
Vector< N, T > & operator= (Vector< N, T > const &other)
Vector< N, T > & operator+= (Vector< N, T > const &other)
Vector< N, T > & operator-= (Vector< N, T > const &other)
Vector< N, T > & operator*= (T s)
Vector< N, T > & operator/= (T s)


Detailed Description

template<size_t N, typename T>
class Vector< N, T >

A vector.

A vector-class holding N elements of type T. To function properly T must support:

Most frequent use will be Vector3d

Definition at line 25 of file Vector.h.


Constructor & Destructor Documentation

template<size_t N, typename T >
Vector< N, T >::Vector (  )  [inline]

Initializes every item with default value

Definition at line 99 of file Vector.h.

template<size_t N, typename T >
Vector< N, T >::Vector ( v  )  [inline]

Initializes every item with v

Parameters:
v Default value for every item

Definition at line 107 of file Vector.h.

template<size_t N, typename T >
Vector< N, T >::Vector ( Vector< N, T > const &  other  )  [inline]

Copy-Constructor

Parameters:
other Vector to be copied

Definition at line 115 of file Vector.h.


Member Function Documentation

template<size_t N, typename T >
T & Vector< N, T >::at ( size_t const  i  )  [inline]

Get reference to element at position i

Parameters:
i Position of the element
Returns:
A reference to the element

Definition at line 149 of file Vector.h.

template<size_t N, typename T >
T Vector< N, T >::get ( size_t  i  )  const [inline]

Returns:
Element at positon i or 0 if i not in range

Definition at line 123 of file Vector.h.

template<size_t N, typename T >
size_t Vector< N, T >::getSize (  )  const [inline]

Returns:
The size of the Vector (N)

Definition at line 56 of file Vector.h.

template<size_t N, typename T >
Vector< N, T > & Vector< N, T >::operator*= ( s  )  [inline]

Parameters:
s Scalar to multiply with

Definition at line 192 of file Vector.h.

template<size_t N, typename T >
Vector< N, T > & Vector< N, T >::operator+= ( Vector< N, T > const &  other  )  [inline]

Parameters:
other Vector to be added

Definition at line 174 of file Vector.h.

template<size_t N, typename T >
Vector< N, T > & Vector< N, T >::operator-= ( Vector< N, T > const &  other  )  [inline]

Parameters:
other Vector to be substracted

Definition at line 183 of file Vector.h.

template<size_t N, typename T >
Vector< N, T > & Vector< N, T >::operator/= ( s  )  [inline]

Parameters:
s Scalat to divide through

Definition at line 201 of file Vector.h.

template<size_t N, typename T >
Vector< N, T > & Vector< N, T >::operator= ( Vector< N, T > const &  other  )  [inline]

Assignment-operator

Parameters:
other Vector to be assigned

Definition at line 162 of file Vector.h.

template<size_t N, typename T >
T& Vector< N, T >::operator[] ( size_t const   i  )  [inline]

Array-style access of elements

Parameters:
i Position of the element
Returns:
A reference to the element

Definition at line 70 of file Vector.h.

template<size_t N, typename T >
void Vector< N, T >::set ( size_t  i,
v 
) [inline]

Sets element at position i to v. Does nothing if i is out of range.

Parameters:
i Position of element to be set
v Value to be set

Definition at line 136 of file Vector.h.


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

Generated on Sun Nov 30 23:45:40 2008 for Modular Motion Processor by  doxygen 1.5.7.1