My Project
|
Provide read-only and read/write access to constantly sized portions/windows of a linearised buffer with an implied row/column matrix (2D array) structure. More...
#include <WindowedArray.hpp>
Classes | |
struct | NumCols |
Distinct compile-time type for number of matrix columns in underlying storage. More... | |
struct | NumRows |
Distinct compile-time type for number of matrix rows in underlying storage. More... | |
Public Types | |
using | WriteWindow = typename WindowedArray< T >::WriteWindow |
using | ReadWindow = typename WindowedArray< T >::ReadWindow |
using | WindowSize = typename WindowedArray< T >::WindowSize |
using | Idx = typename WindowedArray< T >::Idx |
Public Member Functions | |
WindowedMatrix (const NumRows &nRows, const NumCols &nCols, const WindowSize &sz) | |
Constructor. | |
Idx | numCols () const |
Retrieve number of columns allocated for this matrix. | |
Idx | numRows () const |
Retrieve number of rows allocated for this matrix. | |
Idx | windowSize () const |
Retrieve number of data items per windows. | |
WriteWindow | operator() (const Idx row, const Idx col) |
Request read/write access to individual window. | |
ReadWindow | operator() (const Idx row, const Idx col) const |
Request read-only access to individual window. | |
auto | data () const -> decltype(std::declval< const WindowedArray< T > >().data()) |
Get read-only access to full, linearised data items for all windows. | |
auto | getDataDestructively () -> decltype(std::declval< WindowedArray< T > >() .getDataDestructively()) |
Extract full, linearised data items for all windows. | |
Provide read-only and read/write access to constantly sized portions/windows of a linearised buffer with an implied row/column matrix (2D array) structure.
Intended as backing store for vectors that have a constant number of items per sub-entity of a fixed number of containing entities (e.g., K double precision data items for each of N maximum well connections for each of M maximum active wells at a particular report step).
T | Element type for underlying data items. |
|
inlineexplicit |
Constructor.
[in] | nRows | Number of rows. |
[in] | nCols | Number of columns. |
[in] | sz | Number of data items per (row,column) window. |
|
inline |
Extract full, linearised data items for all windows.
Destroys the internal state of the WindowedMatrix
.
|
inline |
Request read/write access to individual window.
[in] | row | Numeric ID of particular row in matrix. Must be in range [0 .. numRows()-1]
Idx numRows() const Retrieve number of rows allocated for this matrix. Definition WindowedArray.hpp:204 |
[in] | col | Numeric ID of particular column in matrix. Must be in range [0 .. numCols()-1]
Idx numCols() const Retrieve number of columns allocated for this matrix. Definition WindowedArray.hpp:198 |
|
inline |