OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
FArray1D< T, N > Class Template Reference

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

#include <FArray1D.h>

Inheritance diagram for FArray1D< T, N >:
Collaboration diagram for FArray1D< T, N >:

Public Types

typedef T value_type
 The value type of this array.
typedef T * iterator
 Iterator for the array.
typedef const T * const_iterator
 Iterator for constant array.

Public Member Functions

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

Protected Attributes

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

◆ const_iterator

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.

◆ iterator

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

Iterator for the array.

Definition at line 47 of file FArray1D.h.

◆ value_type

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

◆ FArray1D() [1/4]

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

Default constructor.

Definition at line 119 of file FArray1D.h.

References begin(), and end().

Referenced by FArray1D(), FVector< T, N >::FVector(), FVector< T, N >::FVector(), FVector< T, N >::FVector(), FVector< T, N >::FVector(), FVector< double, 6 >::FVector(), and operator=().

Here is the call graph for this function:

◆ FArray1D() [2/4]

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

Constructor.

Definition at line 131 of file FArray1D.h.

References begin(), and end().

Here is the call graph for this function:

◆ FArray1D() [3/4]

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 begin(), end(), and FArray1D().

Here is the call graph for this function:

◆ FArray1D() [4/4]

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 begin(), begin(), and end().

Here is the call graph for this function:

Member Function Documentation

◆ begin() [1/2]

◆ begin() [2/2]

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.

References data.

◆ end() [1/2]

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

◆ end() [2/2]

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.

References data.

◆ operator()() [1/2]

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

Get element.

Definition at line 174 of file FArray1D.h.

References data.

◆ operator()() [2/2]

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

Get element.

Definition at line 183 of file FArray1D.h.

References data.

◆ operator=()

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 begin(), end(), and FArray1D().

Here is the call graph for this function:

◆ operator[]() [1/2]

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

Get element.

Definition at line 162 of file FArray1D.h.

References data.

◆ operator[]() [2/2]

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.

References data.

◆ size()

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

◆ data

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

Definition at line 111 of file FArray1D.h.

Referenced by begin(), begin(), end(), end(), operator()(), operator()(), operator[](), and operator[]().


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