# DGtal::Vector< T, N > Class Template Reference

`#include <Vector.h>`

Inheritance diagram for DGtal::Vector< T, N >:
[legend]
Collaboration diagram for DGtal::Vector< T, N >:
[legend]

List of all members.

## Public Types

typedef PointVector< T, N >
::Iterator
Iterator
typedef PointVector< T, N >
::ConstIterator
ConstIterator

## Public Member Functions

Vector ()
~Vector ()
Vector (const T *ptrValues)
Vector (const Vector &other)
Vector< T, N > & operator+= (const Vector< T, N > &v)
Vector< T, N > operator+ (const Vector< T, N > &v) const
Vector< T, N > & operator-= (const Vector< T, N > &v)
Vector< T, N > operator- (const Vector< T, N > &v) const
Vector< T, N > & operator= (const Vector< T, N > &other)
void selfDisplay (std::ostream &out) const
bool isValid () const

## Static Public Attributes

static const std::size_t Dimension = N

## Detailed Description

### template<typename T, std::size_t N> class DGtal::Vector< T, N >

Description of class 'Vector'

Aim: Implement the notion of Vector in a Digital Space. They are not truely vectors (as in vector spaces) but rather Z-modules. The main difference is that the inverse may not exist.

## Member Typedef Documentation

template<typename T, std::size_t N>
 typedef PointVector::ConstIterator DGtal::Vector< T, N >::ConstIterator

Reimplemented from DGtal::PointVector< T, N >.

template<typename T, std::size_t N>
 typedef PointVector::Iterator DGtal::Vector< T, N >::Iterator

Copy of the Boost::array iterator type

Reimplemented from DGtal::PointVector< T, N >.

## Constructor & Destructor Documentation

template<typename T, std::size_t N>
 DGtal::Vector< T, N >::Vector ( )

Constructor.

template<typename T, std::size_t N>
 DGtal::Vector< T, N >::~Vector ( )

Destructor.

template<typename T, std::size_t N>
 DGtal::Vector< T, N >::Vector ( const T * ptrValues )

Constructor from array of values.

Parameters:
 ptrValues the array of values (should be at least as long as the size of the vector)
template<typename T, std::size_t N>
 DGtal::Vector< T, N >::Vector ( const Vector< T, N > & other )

Copy constructor.

Parameters:
 other the object to clone.

## Member Function Documentation

template<typename T, std::size_t N>
 bool DGtal::Vector< T, N >::isValid ( ) const

Checks the validity/consistency of the object.

Returns:
'true' if the object is valid, 'false' otherwise.

Reimplemented from DGtal::PointVector< T, N >.

template<typename T, std::size_t N>
 Vector DGtal::Vector< T, N >::operator+ ( const Vector< T, N > & v ) const

Addition operator.

Parameters:
 v is the Vector that gets added to *this.
template<typename T, std::size_t N>
 Vector& DGtal::Vector< T, N >::operator+= ( const Vector< T, N > & v )

Addition operator.

Parameters:
 v is the Vector that gets added to *this.
template<typename T, std::size_t N>
 Vector DGtal::Vector< T, N >::operator- ( const Vector< T, N > & v ) const

Substraction operator.

Parameters:
 v is the Vector that gets added to *this.
template<typename T, std::size_t N>
 Vector& DGtal::Vector< T, N >::operator-= ( const Vector< T, N > & v )

Substraction operator with assignement.

Parameters:
 v is the Vector that gets substracted to *this.
template<typename T, std::size_t N>
 Vector& DGtal::Vector< T, N >::operator= ( const Vector< T, N > & other )

Assignment.

Parameters:
 other the object to copy.
Returns:
a reference on 'this'.
template<typename T, std::size_t N>
 void DGtal::Vector< T, N >::selfDisplay ( std::ostream & out ) const

Assignment from a Point.

Parameters:
 other the Point to copy.
Returns:
a reference on 'this'. Writes/Displays the object on an output stream.
Parameters:
 out the output stream where the object is written.

Reimplemented from DGtal::PointVector< T, N >.

## Member Data Documentation

template<typename T, std::size_t N>
 const std::size_t DGtal::Vector< T, N >::Dimension = N` [static]`

Reimplemented from DGtal::PointVector< T, N >.

The documentation for this class was generated from the following file:
Generated on Fri Jun 18 14:39:28 2010 for DGtal by  1.6.3