OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Types | Public Member Functions | Protected Attributes | List of all members
Array1D< T > Class Template Reference

One-dimensional array. More...

#include <Array1D.h>

Inheritance diagram for Array1D< T >:
Inheritance graph
[legend]

Public Types

typedef T value_type
 The value type of this array. More...
 
typedef Titerator
 The iterator type for the array. More...
 
typedef const Tconst_iterator
 The iterator type for constant array. More...
 

Public Member Functions

 Array1D ()
 Default constructor. More...
 
 Array1D (int n)
 Constructor. More...
 
 Array1D (int n, const T &t)
 Constructor. More...
 
 Array1D (const Array1D< T > &)
 
 ~Array1D ()
 
Array1D< T > & operator= (const Array1D< T > &)
 
Toperator() (int n)
 Get reference to element. More...
 
const Toperator() (int n) const
 Get value of element. More...
 
Toperator[] (int)
 Get reference to element. More...
 
const Toperator[] (int) const
 Get value of element. More...
 
iterator begin ()
 Get beginning of data. More...
 
iterator end ()
 Get end of data. More...
 
const_iterator begin () const
 Get beginning of data. More...
 
const_iterator end () const
 Get end of data. More...
 
int size () const
 Get array size. More...
 
void resize (int size)
 Change array size. More...
 

Protected Attributes

int len
 
Tdata
 

Detailed Description

template<class T>
class Array1D< T >

One-dimensional array.

Definition at line 36 of file Array1D.h.

Member Typedef Documentation

template<class T>
typedef const T* Array1D< T >::const_iterator

The iterator type for constant array.

Definition at line 47 of file Array1D.h.

template<class T>
typedef T* Array1D< T >::iterator

The iterator type for the array.

Definition at line 44 of file Array1D.h.

template<class T>
typedef T Array1D< T >::value_type

The value type of this array.

Definition at line 41 of file Array1D.h.

Constructor & Destructor Documentation

template<class T >
Array1D< T >::Array1D ( )

Default constructor.

Definition at line 127 of file Array1D.h.

template<class T >
Array1D< T >::Array1D ( int  n)
explicit

Constructor.

Definition at line 140 of file Array1D.h.

template<class T>
Array1D< T >::Array1D ( int  n,
const T t 
)

Constructor.

Definition at line 146 of file Array1D.h.

References Array1D< T >::begin(), and Array1D< T >::end().

Here is the call graph for this function:

template<class T>
Array1D< T >::Array1D ( const Array1D< T > &  array)

Definition at line 133 of file Array1D.h.

References Array1D< T >::begin(), and Array1D< T >::end().

Here is the call graph for this function:

template<class T >
Array1D< T >::~Array1D ( )

Definition at line 153 of file Array1D.h.

Member Function Documentation

template<class T >
Array1D< T >::iterator Array1D< T >::begin ( )
template<class T >
Array1D< T >::const_iterator Array1D< T >::begin ( ) const

Get beginning of data.

Definition at line 216 of file Array1D.h.

template<class T >
Array1D< T >::iterator Array1D< T >::end ( )
template<class T >
Array1D< T >::const_iterator Array1D< T >::end ( ) const

Get end of data.

Definition at line 222 of file Array1D.h.

template<class T >
T & Array1D< T >::operator() ( int  n)

Get reference to element.

Definition at line 186 of file Array1D.h.

template<class T >
const T & Array1D< T >::operator() ( int  n) const

Get value of element.

Definition at line 195 of file Array1D.h.

template<class T>
Array1D< T > & Array1D< T >::operator= ( const Array1D< T > &  rhs)

Definition at line 159 of file Array1D.h.

References Array1D< T >::begin(), Array1D< T >::end(), Array1D< T >::len, and T.

Referenced by Vector< T >::operator=().

Here is the call graph for this function:

template<class T >
T & Array1D< T >::operator[] ( int  i)
inline

Get reference to element.

Definition at line 174 of file Array1D.h.

template<class T >
const T & Array1D< T >::operator[] ( int  i) const
inline

Get value of element.

Definition at line 180 of file Array1D.h.

template<class T >
void Array1D< T >::resize ( int  size)

Change array size.

Definition at line 234 of file Array1D.h.

References Hypervolume::n, and T.

template<class T >
int Array1D< T >::size ( ) const

Member Data Documentation

template<class T>
T* Array1D< T >::data
protected

Definition at line 119 of file Array1D.h.

template<class T>
int Array1D< T >::len
protected

Definition at line 116 of file Array1D.h.

Referenced by Array1D< T >::operator=().


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