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

A templated representation for vectors. More...

#include <FVector.h>

Inheritance diagram for FVector< T, N >:
Collaboration diagram for FVector< 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

 FVector ()
 Constructor.
 FVector (const T &t)
 Constructor.
 FVector (const T *t)
 Constructor.
 FVector (const FArray1D< T, N > &)
 Conversion from one-dimensional array.
FVector operator- () const
 Change sign.
FVectoroperator*= (const T &)
 Multiply by scalar and assign.
FVectoroperator/= (const T &)
 Divide by scalar and assign.
FVectoroperator+= (const FVector &)
 Add FVector and assign.
FVectoroperator-= (const FVector &)
 Subtract FVector and assign.
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.
const_iterator begin () const
 Get iterator pointing to beginning of array.
iterator end ()
 Get iterator pointing past end 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 FVector< T, N >

A templated representation for vectors.

Definition at line 38 of file FVector.h.

Member Typedef Documentation

◆ const_iterator

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

Iterator for constant array.

Definition at line 50 of file FArray1D.h.

◆ iterator

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

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
inherited

The value type of this array.

Definition at line 44 of file FArray1D.h.

Constructor & Destructor Documentation

◆ FVector() [1/4]

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

Constructor.

Definition at line 113 of file FVector.h.

References FArray1D< T, N >::FArray1D().

Referenced by operator*=(), operator+=(), operator-(), operator-=(), and operator/=().

Here is the call graph for this function:

◆ FVector() [2/4]

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

Constructor.

Definition at line 119 of file FVector.h.

References FArray1D< T, N >::FArray1D().

Here is the call graph for this function:

◆ FVector() [3/4]

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

Constructor.

Definition at line 125 of file FVector.h.

References FArray1D< T, N >::FArray1D().

Here is the call graph for this function:

◆ FVector() [4/4]

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

Conversion from one-dimensional array.

Definition at line 131 of file FVector.h.

References FArray1D< T, N >::FArray1D().

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
inlineinherited

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 ( )
inlineinherited

◆ end() [2/2]

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

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)
inherited

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
inherited

Get element.

Definition at line 183 of file FArray1D.h.

References data.

◆ operator*=()

template<class T, int N>
FVector< T, N > & FVector< T, N >::operator*= ( const T & val)

Multiply by scalar and assign.

Definition at line 145 of file FVector.h.

References begin(), end(), and FVector().

Here is the call graph for this function:

◆ operator+=()

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

Add FVector and assign.

Definition at line 161 of file FVector.h.

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

Here is the call graph for this function:

◆ operator-()

template<class T, int N>
FVector< T, N > FVector< T, N >::operator- ( ) const

Change sign.

Definition at line 137 of file FVector.h.

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

Here is the call graph for this function:

◆ operator-=()

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

Subtract FVector and assign.

Definition at line 169 of file FVector.h.

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

Here is the call graph for this function:

◆ operator/=()

template<class T, int N>
FVector< T, N > & FVector< T, N >::operator/= ( const T & val)

Divide by scalar and assign.

Definition at line 153 of file FVector.h.

References begin(), end(), and FVector().

Here is the call graph for this function:

◆ operator[]() [1/2]

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

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
inlineinherited

Get element.

Definition at line 168 of file FArray1D.h.

References data.

◆ size()

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

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]
protectedinherited

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 files: