marray::Vector< T, A > Class Template Reference

One-dimensional Marray. More...

#include <marray.hxx>

Inheritance diagram for marray::Vector< T, A >:
Inheritance graph
[legend]
Collaboration diagram for marray::Vector< T, A >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef Marray< T, A > base
typedef base::value_type value_type
typedef base::pointer pointer
typedef base::const_pointer const_pointer
typedef base::reference reference
typedef base::const_reference const_reference
typedef base::iterator iterator
typedef base::reverse_iterator reverse_iterator
typedef base::const_iterator const_iterator
typedef
base::const_reverse_iterator 
const_reverse_iterator
typedef base::allocator_type allocator_type

Public Member Functions

 Vector (const allocator_type &=allocator_type())
 Empty constructor.
template<class TLocal , bool isConstLocal, class ALocal >
 Vector (const View< TLocal, isConstLocal, ALocal > &)
 Copy constructor.
 Vector (const size_t, const T &=T(), const allocator_type &=allocator_type())
 Construct Vector with initialization.
 Vector (const InitializationSkipping &, const size_t, const allocator_type &=allocator_type())
 Construct Vector without initialization.
template<class E , class Te >
 Vector (const ViewExpression< E, Te > &, const allocator_type &=allocator_type())
 Construct Vector from ViewExpression.
Vector< T, A > & operator= (const T &)
 Assignment.
Vector< T, A > & operator= (const Vector< T, A > &)
 Assignment.
template<class TLocal , bool isConstLocal, class ALocal >
Vector< T, A > & operator= (const View< TLocal, isConstLocal, ALocal > &)
 Assignment from View.
template<class E , class Te >
Vector< T, A > & operator= (const ViewExpression< E, Te > &)
 Assignment from ViewExpression.
T & operator[] (const size_t)
 Element access.
const T & operator[] (const size_t) const
 Element access.
void reshape (const size_t)
 Reshape.
void resize (const size_t, const T &=T())
 Resize (existing entries are preserved, new entries are initialized).
void resize (const InitializationSkipping &, const size_t)
 Resize (existing entries are preserved).

Detailed Description

template<class T, class A>
class marray::Vector< T, A >

One-dimensional Marray.

Definition at line 630 of file marray.hxx.


Member Typedef Documentation

template<class T, class A>
typedef base::allocator_type marray::Vector< T, A >::allocator_type

Reimplemented from marray::Marray< T, A >.

Definition at line 644 of file marray.hxx.

template<class T, class A>
typedef Marray<T, A> marray::Vector< T, A >::base

Reimplemented from marray::Marray< T, A >.

Definition at line 634 of file marray.hxx.

template<class T, class A>
typedef base::const_iterator marray::Vector< T, A >::const_iterator

Reimplemented from marray::Marray< T, A >.

Definition at line 642 of file marray.hxx.

template<class T, class A>
typedef base::const_pointer marray::Vector< T, A >::const_pointer

Reimplemented from marray::Marray< T, A >.

Definition at line 637 of file marray.hxx.

template<class T, class A>
typedef base::const_reference marray::Vector< T, A >::const_reference

Reimplemented from marray::Marray< T, A >.

Definition at line 639 of file marray.hxx.

template<class T, class A>
typedef base::const_reverse_iterator marray::Vector< T, A >::const_reverse_iterator

Reimplemented from marray::Marray< T, A >.

Definition at line 643 of file marray.hxx.

template<class T, class A>
typedef base::iterator marray::Vector< T, A >::iterator

Reimplemented from marray::Marray< T, A >.

Definition at line 640 of file marray.hxx.

template<class T, class A>
typedef base::pointer marray::Vector< T, A >::pointer

Reimplemented from marray::Marray< T, A >.

Definition at line 636 of file marray.hxx.

template<class T, class A>
typedef base::reference marray::Vector< T, A >::reference

Reimplemented from marray::Marray< T, A >.

Definition at line 638 of file marray.hxx.

template<class T, class A>
typedef base::reverse_iterator marray::Vector< T, A >::reverse_iterator

Reimplemented from marray::Marray< T, A >.

Definition at line 641 of file marray.hxx.

template<class T, class A>
typedef base::value_type marray::Vector< T, A >::value_type

Reimplemented from marray::Marray< T, A >.

Definition at line 635 of file marray.hxx.


Constructor & Destructor Documentation

template<class T , class A >
marray::Vector< T, A >::Vector ( const allocator_type allocator = allocator_type()  )  [inline]

Empty constructor.

Parameters:
allocator Allocator.

Definition at line 4638 of file marray.hxx.

template<class T , class A >
template<class TLocal , bool isConstLocal, class ALocal >
marray::Vector< T, A >::Vector ( const View< TLocal, isConstLocal, ALocal > &  in  )  [inline]

Copy constructor.

Parameters:
in Vector (source).

Definition at line 4654 of file marray.hxx.

Here is the call graph for this function:

template<class T , class A >
marray::Vector< T, A >::Vector ( const size_t  size,
const T &  value = T(),
const allocator_type allocator = allocator_type() 
) [inline]

Construct Vector with initialization.

Parameters:
size Size.
value Initial value of entries.
allocator Allocator.

Definition at line 4698 of file marray.hxx.

template<class T , class A >
marray::Vector< T, A >::Vector ( const InitializationSkipping is,
const size_t  size,
const allocator_type allocator = allocator_type() 
) [inline]

Construct Vector without initialization.

Parameters:
is Flag to be set to SkipInitialization.
size Size.
allocator Allocator.

Definition at line 4725 of file marray.hxx.

template<class T , class A >
template<class E , class Te>
marray::Vector< T, A >::Vector ( const ViewExpression< E, Te > &  expression,
const allocator_type allocator = allocator_type() 
) [inline]

Construct Vector from ViewExpression.

Parameters:
expression ViewExpression.
allocator Allocator.

Definition at line 4749 of file marray.hxx.

Here is the call graph for this function:


Member Function Documentation

template<class T , class A >
template<class E , class Te>
Vector< T, A > & marray::Vector< T, A >::operator= ( const ViewExpression< E, Te > &  expression  )  [inline]

Assignment from ViewExpression.

Parameters:
expression ViewExpression.

Reimplemented from marray::Marray< T, A >.

Definition at line 4876 of file marray.hxx.

Here is the call graph for this function:

template<class T , class A >
template<class TLocal , bool isConstLocal, class ALocal >
Vector< T, A > & marray::Vector< T, A >::operator= ( const View< TLocal, isConstLocal, ALocal > &  in  )  [inline]

Assignment from View.

Parameters:
in View.

The entries of 'in' are copied in the coordinate order of 'in'.

Reimplemented from marray::Marray< T, A >.

Definition at line 4837 of file marray.hxx.

Here is the call graph for this function:

template<class T , class A >
Vector< T, A > & marray::Vector< T, A >::operator= ( const Vector< T, A > &  in  )  [inline]

Assignment.

Parameters:
in Vector

The entries of 'in' are copied.

Definition at line 4817 of file marray.hxx.

template<class T , class A >
Vector< T, A > & marray::Vector< T, A >::operator= ( const T &  value  )  [inline]

Assignment.

Parameters:
value Value.

All entries are set to value.

Reimplemented from marray::Marray< T, A >.

Definition at line 4797 of file marray.hxx.

template<class T , class A >
const T & marray::Vector< T, A >::operator[] ( const size_t  index  )  const [inline]

Element access.

Reimplemented from marray::View< T, false, A >.

Definition at line 4969 of file marray.hxx.

template<class T , class A >
T & marray::Vector< T, A >::operator[] ( const size_t  index  )  [inline]

Element access.

Reimplemented from marray::View< T, false, A >.

Definition at line 4956 of file marray.hxx.

template<class T , class A >
void marray::Vector< T, A >::reshape ( const size_t  size  )  [inline]

Reshape.

A Vector can only be reshaped into a Vector which has the same size and thus the same shape. The main pupose of this function is to hide the function reshape inherited from View in a way that is C++ standard complient.

Parameters:
size New size (which has to equal the current size).

Definition at line 4898 of file marray.hxx.

template<class T , class A >
void marray::Vector< T, A >::resize ( const InitializationSkipping is,
const size_t  size 
) [inline]

Resize (existing entries are preserved).

Parameters:
is Flag to be set to SkipInitialization.
size New size.

Definition at line 4936 of file marray.hxx.

template<class T , class A >
void marray::Vector< T, A >::resize ( const size_t  size,
const T &  value = T() 
) [inline]

Resize (existing entries are preserved, new entries are initialized).

Parameters:
size New size.
value Value to be assigned to newly allocated entries.

Definition at line 4913 of file marray.hxx.

Here is the caller graph for this function:

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Mon Jun 17 16:31:10 2013 for OpenGM by  doxygen 1.6.3