|
OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
|
A templated representation for 2-dimensional arrays. More...
#include <FArray2D.h>
Public Types | |
| typedef T | value_type |
| The value type of the array. | |
| typedef T * | iterator |
| Iterator for the array. | |
| typedef const T * | const_iterator |
| Iterator for constant array. | |
| typedef T * | row_iterator |
| Iterator for access by rows. | |
| typedef const T * | const_row_iterator |
| Iterator for access by rows. | |
| typedef FSlice< T, N > | col_iterator |
| Iterator for access by columns. | |
| typedef FConstSlice< T, N > | const_col_iterator |
| Iterator for access by columns. | |
Public Member Functions | |
| FArray2D () | |
| Default constructor. | |
| FArray2D (const T &t) | |
| Constructor. | |
| FArray2D (const FArray2D &) | |
| Copy constructor. | |
| const FArray2D< T, M, N > & | operator= (const FArray2D< T, M, N > &) |
| Assignment. | |
| T & | operator() (int r, int c) |
| Get element. | |
| const T & | operator() (int r, int c) const |
| Get element. | |
| int | nrows () const |
| Get number of rows. | |
| int | ncols () const |
| Get number of columns. | |
| int | size () const |
| Get total size. | |
| iterator | begin () |
| Get beginning of data. | |
| iterator | end () |
| Get pointer past end of data. | |
| const_iterator | begin () const |
| Get beginning of data. | |
| const_iterator | end () const |
| Get pointer past end of data. | |
| row_iterator | row_begin (int r) |
| Get row iterator. | |
| row_iterator | row_end (int r) |
| Get row iterator. | |
| const_row_iterator | row_begin (int r) const |
| Get row iterator. | |
| const_row_iterator | row_end (int r) const |
| Get row iterator. | |
| row_iterator | operator[] (int r) |
| Get row iterator. | |
| const_row_iterator | operator[] (int r) const |
| Get row iterator. | |
| col_iterator | col_begin (int c) |
| Get column iterator. | |
| col_iterator | col_end (int c) |
| Get column iterator. | |
| const_col_iterator | col_begin (int c) const |
| Get column iterator. | |
| const_col_iterator | col_end (int c) const |
| Get column iterator. | |
| void | getColumn (FArray1D< T, M > &toArray, int c) const |
| Fetch column. | |
| void | getRow (FArray1D< T, N > &toArray, int r) const |
| Fetch row. | |
| void | putColumn (const FArray1D< T, M > &fromArray, int c) |
| Store column. | |
| void | putRow (const FArray1D< T, N > &fromArray, int r) |
| Store row. | |
| void | swapColumns (int c1, int c2) |
| Exchange columns. | |
| void | swapRows (int r1, int r2) |
| Exchange rows. | |
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.
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.
| typedef T* FArray2D< T, M, N >::iterator |
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.
|
inline |
Default constructor.
Definition at line 210 of file FArray2D.h.
References begin(), and end().
Referenced by FArray2D(), and operator=().
|
inlineexplicit |
Constructor.
Definition at line 216 of file FArray2D.h.
References begin(), and end().
Copy constructor.
Definition at line 222 of file FArray2D.h.
References begin(), end(), and FArray2D().
|
inline |
Get beginning of data.
Definition at line 271 of file FArray2D.h.
References data.
Referenced by FArray2D(), FMatrix< T, R, C >::operator+=(), operator-(), FMatrix< T, R, C >::operator-=(), and operator=().
|
inline |
| 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 FLUMatrix< T, N >::backSubstitute(), getColumn(), operator*(), operator*(), putColumn(), swapColumns(), and FMatrix< T, R, C >::transpose().
| 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 getColumn(), and swapColumns().
| 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.
|
inline |
Get pointer past end of data.
Definition at line 277 of file FArray2D.h.
Referenced by FArray2D(), operator-(), and 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(), c, col_begin(), and col_end().
| 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(), row_begin(), and row_end().
|
inline |
Get number of columns.
Definition at line 259 of file FArray2D.h.
|
inline |
Get number of rows.
Definition at line 253 of file FArray2D.h.
|
inline |
|
inline |
| 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 begin(), end(), and FArray2D().
Referenced by FMatrix< T, R, C >::operator=(), and FMatrix< T, R, C >::operator=().
| FArray2D< T, M, N >::row_iterator FArray2D< T, M, N >::operator[] | ( | int | r | ) |
| FArray2D< T, M, N >::const_row_iterator FArray2D< T, M, N >::operator[] | ( | int | r | ) | const |
| 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(), c, col_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(), FArray1D< T, N >::end(), and row_begin().
| 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.
References data.
Referenced by getRow(), operator*(), operator*(), putRow(), and swapRows().
| FArray2D< T, M, N >::const_row_iterator FArray2D< T, M, N >::row_begin | ( | int | r | ) | const |
| 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.
References data.
Referenced by getRow(), operator*(), operator*(), and swapRows().
| FArray2D< T, M, N >::const_row_iterator FArray2D< T, M, N >::row_end | ( | int | r | ) | const |
|
inline |
| void FArray2D< T, M, N >::swapColumns | ( | int | c1, |
| int | c2 ) |
Exchange columns.
Definition at line 403 of file FArray2D.h.
References col_begin(), and col_end().
| void FArray2D< T, M, N >::swapRows | ( | int | r1, |
| int | r2 ) |
Exchange rows.
Definition at line 409 of file FArray2D.h.
References row_begin(), and row_end().
|
protected |
Definition at line 199 of file FArray2D.h.
Referenced by begin(), begin(), end(), end(), operator()(), operator()(), operator[](), operator[](), row_begin(), row_begin(), row_end(), and row_end().
|
staticprotected |
Definition at line 202 of file FArray2D.h.