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

A templated representation for one-dimensional arrays. More...

#include <FArray1D.h>

Inheritance diagram for FArray1D< T, N >:
Inheritance graph
[legend]

Public Types

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

Public Member Functions

 FArray1D ()
 Default constructor. More...
 
 FArray1D (const T &t)
 Constructor. More...
 
 FArray1D (const FArray1D &)
 Copy constructor. More...
 
 FArray1D (const std::initializer_list< T > &)
 Consructor with initializer list (needs C++11) (see http://en.cppreference.com/w/cpp/utility/initializer_list) More...
 
const FArray1Doperator= (const FArray1D &)
 Assignment. More...
 
Toperator() (int n)
 Get element. More...
 
const Toperator() (int n) const
 Get element. More...
 
Toperator[] (int n)
 Get element. More...
 
const Toperator[] (int n) const
 Get element. More...
 
iterator begin ()
 Get iterator pointing to beginning of array. More...
 
iterator end ()
 Get iterator pointing past end of array. More...
 
const_iterator begin () const
 Get iterator pointing to beginning of array. More...
 
const_iterator end () const
 Get iterator pointing past end of array. More...
 
int size () const
 Get array size. More...
 

Protected Attributes

T data [N]
 

Detailed Description

template<class T, int N>
class FArray1D< T, N >

A templated representation for one-dimensional arrays.

Definition at line 39 of file FArray1D.h.

Member Typedef Documentation

template<class T, int N>
typedef const T* FArray1D< T, N >::const_iterator

Iterator for constant array.

Definition at line 50 of file FArray1D.h.

template<class T, int N>
typedef T* FArray1D< T, N >::iterator

Iterator for the array.

Definition at line 47 of file FArray1D.h.

template<class T, int N>
typedef T FArray1D< T, N >::value_type

The value type of this array.

Definition at line 44 of file FArray1D.h.

Constructor & Destructor Documentation

template<class T , int N>
FArray1D< T, N >::FArray1D ( )

Default constructor.

Definition at line 119 of file FArray1D.h.

References T.

template<class T, int N>
FArray1D< T, N >::FArray1D ( const T t)
explicit

Constructor.

Definition at line 131 of file FArray1D.h.

template<class T, int N>
FArray1D< T, N >::FArray1D ( const FArray1D< T, N > &  rhs)

Copy constructor.

Definition at line 125 of file FArray1D.h.

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

Here is the call graph for this function:

template<class T, int N>
FArray1D< T, N >::FArray1D ( const std::initializer_list< T > &  init)

Consructor with initializer list (needs C++11) (see http://en.cppreference.com/w/cpp/utility/initializer_list)

Definition at line 138 of file FArray1D.h.

References T.

Member Function Documentation

template<class T , int N>
FArray1D< T, N >::iterator FArray1D< T, N >::begin ( )
inline
template<class T , int N>
FArray1D< T, N >::const_iterator FArray1D< T, N >::begin ( ) const
inline

Get iterator pointing to beginning of array.

Definition at line 204 of file FArray1D.h.

template<class T , int N>
FArray1D< T, N >::iterator FArray1D< T, N >::end ( )
inline
template<class T , int N>
FArray1D< T, N >::const_iterator FArray1D< T, N >::end ( ) const
inline

Get iterator pointing past end of array.

Definition at line 210 of file FArray1D.h.

template<class T , int N>
T & FArray1D< T, N >::operator() ( int  n)

Get element.

Definition at line 174 of file FArray1D.h.

template<class T , int N>
const T & FArray1D< T, N >::operator() ( int  n) const

Get element.

Definition at line 183 of file FArray1D.h.

template<class T , int N>
const FArray1D< T, N > & FArray1D< T, N >::operator= ( const FArray1D< T, N > &  rhs)

Assignment.

Definition at line 155 of file FArray1D.h.

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

Here is the call graph for this function:

template<class T , int N>
T & FArray1D< T, N >::operator[] ( int  n)
inline

Get element.

Definition at line 162 of file FArray1D.h.

template<class T , int N>
const T & FArray1D< T, N >::operator[] ( int  n) const
inline

Get element.

Definition at line 168 of file FArray1D.h.

template<class T , int N>
int FArray1D< T, N >::size ( ) const
inline

Get array size.

Definition at line 216 of file FArray1D.h.

Referenced by scaled_norm().

Member Data Documentation

template<class T, int N>
T FArray1D< T, N >::data[N]
protected

Definition at line 111 of file FArray1D.h.


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