OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
A templated representation for 2-dimensional arrays. More...
#include <FArray2D.h>
Public Types | |
typedef T | value_type |
The value type of the array. More... | |
typedef T * | iterator |
Iterator for the array. More... | |
typedef const T * | const_iterator |
Iterator for constant array. More... | |
typedef T * | row_iterator |
Iterator for access by rows. More... | |
typedef const T * | const_row_iterator |
Iterator for access by rows. More... | |
typedef FSlice< T, N > | col_iterator |
Iterator for access by columns. More... | |
typedef FConstSlice< T, N > | const_col_iterator |
Iterator for access by columns. More... | |
Public Member Functions | |
FArray2D () | |
Default constructor. More... | |
FArray2D (const T &t) | |
Constructor. More... | |
FArray2D (const FArray2D &) | |
Copy constructor. More... | |
const FArray2D< T, M, N > & | operator= (const FArray2D< T, M, N > &) |
Assignment. More... | |
T & | operator() (int r, int c) |
Get element. More... | |
const T & | operator() (int r, int c) const |
Get element. More... | |
int | nrows () const |
Get number of rows. More... | |
int | ncols () const |
Get number of columns. More... | |
int | size () const |
Get total size. More... | |
iterator | begin () |
Get beginning of data. More... | |
iterator | end () |
Get pointer past end of data. More... | |
const_iterator | begin () const |
Get beginning of data. More... | |
const_iterator | end () const |
Get pointer past end of data. More... | |
row_iterator | row_begin (int r) |
Get row iterator. More... | |
row_iterator | row_end (int r) |
Get row iterator. More... | |
const_row_iterator | row_begin (int r) const |
Get row iterator. More... | |
const_row_iterator | row_end (int r) const |
Get row iterator. More... | |
row_iterator | operator[] (int r) |
Get row iterator. More... | |
const_row_iterator | operator[] (int r) const |
Get row iterator. More... | |
col_iterator | col_begin (int c) |
Get column iterator. More... | |
col_iterator | col_end (int c) |
Get column iterator. More... | |
const_col_iterator | col_begin (int c) const |
Get column iterator. More... | |
const_col_iterator | col_end (int c) const |
Get column iterator. More... | |
void | getColumn (FArray1D< T, M > &toArray, int c) const |
Fetch column. More... | |
void | getRow (FArray1D< T, N > &toArray, int r) const |
Fetch row. More... | |
void | putColumn (const FArray1D< T, M > &fromArray, int c) |
Store column. More... | |
void | putRow (const FArray1D< T, N > &fromArray, int r) |
Store row. More... | |
void | swapColumns (int c1, int c2) |
Exchange columns. More... | |
void | swapRows (int r1, int r2) |
Exchange rows. More... | |
Protected Attributes | |
T | data [M *N] |
Static Protected Attributes | |
static const int | SIZE = M *N |
A templated representation for 2-dimensional arrays.
Definition at line 40 of file FArray2D.h.
typedef FSlice<T, N> FArray2D< T, M, N >::col_iterator |
Iterator for access by columns.
Definition at line 60 of file FArray2D.h.
typedef FConstSlice<T, N> FArray2D< T, M, N >::const_col_iterator |
Iterator for access by columns.
Definition at line 63 of file FArray2D.h.
typedef const T* FArray2D< T, M, N >::const_iterator |
Iterator for constant array.
Definition at line 51 of file FArray2D.h.
typedef const T* FArray2D< T, M, N >::const_row_iterator |
Iterator for access by rows.
Definition at line 57 of file FArray2D.h.
Iterator for the array.
Definition at line 48 of file FArray2D.h.
typedef T* FArray2D< T, M, N >::row_iterator |
Iterator for access by rows.
Definition at line 54 of file FArray2D.h.
typedef T FArray2D< T, M, N >::value_type |
The value type of the array.
Definition at line 45 of file FArray2D.h.
Constructor.
Definition at line 216 of file FArray2D.h.
Copy constructor.
Definition at line 222 of file FArray2D.h.
References FArray2D< T, M, N >::begin(), and FArray2D< T, M, N >::end().
|
inline |
Get beginning of data.
Definition at line 271 of file FArray2D.h.
Referenced by FArray2D< T, M, N >::FArray2D(), and FArray2D< T, M, N >::operator=().
|
inline |
Get beginning of data.
Definition at line 283 of file FArray2D.h.
FArray2D< T, M, N >::col_iterator FArray2D< T, M, N >::col_begin | ( | int | c | ) |
Get column iterator.
Definition at line 343 of file FArray2D.h.
Referenced by DragtFinnNormalForm< N >::orderModes(), and FNormalForm< N >::orderModes().
FArray2D< T, M, N >::const_col_iterator FArray2D< T, M, N >::col_begin | ( | int | c | ) | const |
Get column iterator.
Definition at line 361 of file FArray2D.h.
FArray2D< T, M, N >::col_iterator FArray2D< T, M, N >::col_end | ( | int | c | ) |
Get column iterator.
Definition at line 352 of file FArray2D.h.
Referenced by DragtFinnNormalForm< N >::orderModes(), and FNormalForm< N >::orderModes().
FArray2D< T, M, N >::const_col_iterator FArray2D< T, M, N >::col_end | ( | int | c | ) | const |
Get column iterator.
Definition at line 370 of file FArray2D.h.
Get pointer past end of data.
Definition at line 277 of file FArray2D.h.
References SIZE.
Referenced by FArray2D< T, M, N >::FArray2D(), and FArray2D< T, M, N >::operator=().
|
inline |
void FArray2D< T, M, N >::getColumn | ( | FArray1D< T, M > & | toArray, |
int | c | ||
) | const |
Fetch column.
Definition at line 379 of file FArray2D.h.
References FArray1D< T, N >::begin().
void FArray2D< T, M, N >::getRow | ( | FArray1D< T, N > & | toArray, |
int | r | ||
) | const |
Fetch row.
Definition at line 385 of file FArray2D.h.
References FArray1D< T, N >::begin().
Get number of columns.
Definition at line 259 of file FArray2D.h.
Get number of rows.
Definition at line 253 of file FArray2D.h.
const FArray2D< T, M, N > & FArray2D< T, M, N >::operator= | ( | const FArray2D< T, M, N > & | rhs | ) |
Assignment.
Definition at line 228 of file FArray2D.h.
References FArray2D< T, M, N >::begin(), and FArray2D< T, M, N >::end().
Referenced by FMatrix< T, M, N >::operator=().
FArray2D< T, M, N >::row_iterator FArray2D< T, M, N >::operator[] | ( | int | r | ) |
Get row iterator.
Definition at line 331 of file FArray2D.h.
FArray2D< T, M, N >::const_row_iterator FArray2D< T, M, N >::operator[] | ( | int | r | ) | const |
Get row iterator.
Definition at line 337 of file FArray2D.h.
void FArray2D< T, M, N >::putColumn | ( | const FArray1D< T, M > & | fromArray, |
int | c | ||
) |
Store column.
Definition at line 391 of file FArray2D.h.
References FArray1D< T, N >::begin(), and FArray1D< T, N >::end().
void FArray2D< T, M, N >::putRow | ( | const FArray1D< T, N > & | fromArray, |
int | r | ||
) |
Store row.
Definition at line 397 of file FArray2D.h.
References FArray1D< T, N >::begin(), and FArray1D< T, N >::end().
FArray2D< T, M, N >::row_iterator FArray2D< T, M, N >::row_begin | ( | int | r | ) |
Get row iterator.
Definition at line 295 of file FArray2D.h.
FArray2D< T, M, N >::const_row_iterator FArray2D< T, M, N >::row_begin | ( | int | r | ) | const |
Get row iterator.
Definition at line 313 of file FArray2D.h.
FArray2D< T, M, N >::row_iterator FArray2D< T, M, N >::row_end | ( | int | r | ) |
Get row iterator.
Definition at line 304 of file FArray2D.h.
FArray2D< T, M, N >::const_row_iterator FArray2D< T, M, N >::row_end | ( | int | r | ) | const |
Get row iterator.
Definition at line 322 of file FArray2D.h.
Exchange columns.
Definition at line 403 of file FArray2D.h.
Referenced by DragtFinnNormalForm< N >::orderModes(), FNormalForm< N >::orderModes(), and DragtFinnMap< N >::orderModes().
Exchange rows.
Definition at line 409 of file FArray2D.h.
Referenced by FLUMatrix< T, N >::FLUMatrix().
Definition at line 199 of file FArray2D.h.
Definition at line 202 of file FArray2D.h.