|
OPAL (Object Oriented Parallel Accelerator Library)
2024.1
OPAL
|
Two-dimensional array. More...
#include <Array2D.h>

Public Types | |
| typedef T | value_type |
| The value type of the array. More... | |
| typedef T * | iterator |
| The iterator type for sequential access to all elements. More... | |
| typedef const T * | const_iterator |
| The iterator type for sequential access to all elements. More... | |
| typedef T * | row_iterator |
| The iterator type for access by rows. More... | |
| typedef const T * | const_row_iterator |
| The iterator type for access by rows for a constant array. More... | |
| typedef SliceIterator< T > | col_iterator |
| The iterator type for access by columns. More... | |
| typedef ConstSliceIterator< T > | const_col_iterator |
| The iterator type for access by columns for a constant array. More... | |
Public Member Functions | |
| Array2D () | |
| Default constructor. More... | |
| Array2D (int rows, int cols) | |
| Constructor. More... | |
| Array2D (int rows, int cols, const T &t) | |
| Constructor. More... | |
| Array2D (const Array2D &) | |
| ~Array2D () | |
| Array2D< T > & | operator= (const Array2D< T > &) |
| T & | operator() (int r, int c) |
| Get element reference. More... | |
| const T & | operator() (int r, int c) const |
| Get element value. More... | |
| int | nrows () const |
| Get number of rows. More... | |
| int | ncols () const |
| Get number of columns. More... | |
| int | size () const |
| Get total size (rows times columns). More... | |
| iterator | begin () |
| Get pointer to beginning of data. More... | |
| iterator | end () |
| Get pointer past end of data. More... | |
| const_iterator | begin () const |
| Get pointer to 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 (Array1D< T > &toArray, int c) const |
| Fetch column. More... | |
| void | getRow (Array1D< T > &toArray, int r) const |
| Fetch row. More... | |
| void | putColumn (const Array1D< T > &fromArray, int c) |
| Store column. More... | |
| void | putRow (const Array1D< T > &fromArray, int r) |
| Store row. More... | |
| void | swapColumns (int c1, int c2) |
| Exchange columns. More... | |
| void | swapRows (int row1, int row2) |
| Exchange rows. More... | |
Protected Attributes | |
| int | rows |
| int | cols |
| int | len |
| T * | data |
Two-dimensional array.
| typedef SliceIterator<T> Array2D< T >::col_iterator |
| typedef ConstSliceIterator<T> Array2D< T >::const_col_iterator |
| typedef const T* Array2D< T >::const_iterator |
| typedef const T* Array2D< T >::const_row_iterator |
| typedef T* Array2D< T >::row_iterator |
| typedef T Array2D< T >::value_type |
Constructor.
Definition at line 252 of file Array2D.h.
References Array2D< T >::begin(), and Array2D< T >::end().

Definition at line 239 of file Array2D.h.
References Array2D< T >::begin(), copy, and Array2D< T >::end().

Get pointer to beginning of data.
Definition at line 319 of file Array2D.h.
Referenced by Array2D< T >::Array2D(), Matrix< T >::operator+=(), operator-(), Matrix< T >::operator-=(), and Array2D< T >::operator=().
|
inline |
| Array2D< T >::col_iterator Array2D< T >::col_begin | ( | int | c | ) |
Get column iterator.
Definition at line 391 of file Array2D.h.
Referenced by LUMatrix< T >::backSubstitute(), Matrix< T >::dotm(), and Matrix< T >::transpose().
| Array2D< T >::const_col_iterator Array2D< T >::col_begin | ( | int | c | ) | const |
| Array2D< T >::col_iterator Array2D< T >::col_end | ( | int | c | ) |
| Array2D< T >::const_col_iterator Array2D< T >::col_end | ( | int | c | ) | const |
Get pointer past end of data.
Definition at line 325 of file Array2D.h.
Referenced by Array2D< T >::Array2D(), operator-(), and Array2D< T >::operator=().
|
inline |
Fetch column.
Definition at line 427 of file Array2D.h.
References Array1D< T >::begin(), copy, and Array1D< T >::size().

Fetch row.
Definition at line 434 of file Array2D.h.
References Array1D< T >::begin(), copy, and Array1D< T >::size().

|
inline |
Get number of columns.
Definition at line 307 of file Array2D.h.
Referenced by LUMatrix< T >::backSubstitute(), Matrix< T >::dotm(), VpsMap< T >::linearTerms(), LUMatrix< T >::LUMatrix(), Matrix< T >::operator+=(), operator-(), Matrix< T >::operator-=(), Tps< T >::substitute(), VpsMap< T >::substituteInto(), and Vps< T >::Vps().
|
inline |
Get number of rows.
Definition at line 301 of file Array2D.h.
Referenced by LUMatrix< T >::backSubstitute(), Matrix< T >::dotm(), VpsMap< T >::linearTerms(), LUMatrix< T >::LUMatrix(), Matrix< T >::operator+=(), operator-(), Matrix< T >::operator-=(), Tps< T >::substitute(), VpsMap< T >::substituteInto(), and Vps< T >::Vps().
|
inline |
|
inline |
Definition at line 265 of file Array2D.h.
References begin, Array2D< T >::begin(), Array2D< T >::cols, copy, Array2D< T >::end(), Array2D< T >::len, Array2D< T >::rows, and Attrib::Legacy::Distribution::T.
Referenced by Matrix< T >::operator=().

| Array2D< T >::row_iterator Array2D< T >::operator[] | ( | int | r | ) |
| Array2D< T >::const_row_iterator Array2D< T >::operator[] | ( | int | r | ) | const |
Store column.
Definition at line 441 of file Array2D.h.
References Array1D< T >::begin(), copy, Array1D< T >::end(), and Array1D< T >::size().

Store row.
Definition at line 450 of file Array2D.h.
References Array1D< T >::begin(), copy, Array1D< T >::end(), and Array1D< T >::size().

| Array2D< T >::row_iterator Array2D< T >::row_begin | ( | int | r | ) |
| Array2D< T >::const_row_iterator Array2D< T >::row_begin | ( | int | r | ) | const |
| Array2D< T >::row_iterator Array2D< T >::row_end | ( | int | r | ) |
| Array2D< T >::const_row_iterator Array2D< T >::row_end | ( | int | r | ) | const |
|
inline |
|
protected |
Definition at line 221 of file Array2D.h.
Referenced by Array2D< T >::operator=().
|
protected |
Definition at line 225 of file Array2D.h.
Referenced by Matrix< T >::Matrix().
|
protected |
Definition at line 222 of file Array2D.h.
Referenced by Array2D< T >::operator=().
|
protected |
Definition at line 220 of file Array2D.h.
Referenced by Array2D< T >::operator=().
1.8.5