|
|
| SparseTable () |
| | Default constructor. Yields an empty SparseTable.
|
| template<typename DataIter, typename IntegerIter> |
| | SparseTable (DataIter data_beg, DataIter data_end, IntegerIter rowsize_beg, IntegerIter rowsize_end) |
| | A constructor taking all the data for the table and row sizes.
|
|
| SparseTable (Storage< T > &&data, Storage< int > &&row_starts) |
| template<typename DataIter, typename IntegerIter> |
| void | assign (DataIter data_beg, DataIter data_end, IntegerIter rowsize_beg, IntegerIter rowsize_end) |
| | Sets the table to contain the given data, organized into rows as indicated by the given row sizes.
|
| template<typename IntegerIter> |
| void | allocate (IntegerIter rowsize_beg, IntegerIter rowsize_end) |
| | Request storage for table of given size.
|
|
template<typename DataIter> |
| void | appendRow (DataIter row_beg, DataIter row_end) |
| | Appends a row to the table.
|
|
OPM_HOST_DEVICE bool | empty () const |
| | True if the table contains no rows.
|
|
OPM_HOST_DEVICE int | size () const |
| | Returns the number of rows in the table.
|
|
void | reserve (int exptd_nrows, int exptd_ndata) |
| | Allocate storage for table of expected size.
|
|
void | swap (SparseTable< T > &other) |
| | Swap contents for other SparseTable<T>.
|
|
OPM_HOST_DEVICE int | dataSize () const |
| | Returns the number of data elements.
|
|
OPM_HOST_DEVICE int | rowSize (int row) const |
| | Returns the size of a table row.
|
|
void | clear () |
| | Makes the table empty().
|
|
OPM_HOST_DEVICE row_type | operator[] (int row) const |
| | Returns a row of the table.
|
|
OPM_HOST_DEVICE mutable_row_type | operator[] (int row) |
| | Returns a mutable row of the table.
|
|
OPM_HOST_DEVICE Iterator | begin () const |
| | Iterator access.
|
|
OPM_HOST_DEVICE Iterator | end () const |
|
OPM_HOST_DEVICE bool | operator== (const SparseTable &other) const |
| | Equality.
|
|
template<class charT, class traits> |
| void | print (std::basic_ostream< charT, traits > &os) const |
|
const T | data (int i) const |
|
const T * | dataPtr () const |
|
const Storage< T > & | dataStorage () const |
|
const Storage< int > & | rowStarts () const |
template<typename T, template< typename, typename... > class Storage = std::vector>
class Opm::SparseTable< T, Storage >
A SparseTable stores a table with rows of varying size as efficiently as possible.
It is supposed to behave similarly to a vector of vectors. Its behaviour is similar to compressed row sparse matrices.
template<typename T, template< typename, typename... > class Storage = std::vector>
template<typename DataIter, typename IntegerIter>
| Opm::SparseTable< T, Storage >::SparseTable |
( |
DataIter | data_beg, |
|
|
DataIter | data_end, |
|
|
IntegerIter | rowsize_beg, |
|
|
IntegerIter | rowsize_end ) |
|
inline |
A constructor taking all the data for the table and row sizes.
- Parameters
-
| data_beg | The start of the table data. |
| data_end | One-beyond-end of the table data. |
| rowsize_beg | The start of the row length data. |
| rowsize_end | One beyond the end of the row length data. |
template<typename T, template< typename, typename... > class Storage = std::vector>
template<typename DataIter, typename IntegerIter>
| void Opm::SparseTable< T, Storage >::assign |
( |
DataIter | data_beg, |
|
|
DataIter | data_end, |
|
|
IntegerIter | rowsize_beg, |
|
|
IntegerIter | rowsize_end ) |
|
inline |
Sets the table to contain the given data, organized into rows as indicated by the given row sizes.
- Parameters
-
| data_beg | The start of the table data. |
| data_end | One-beyond-end of the table data. |
| rowsize_beg | The start of the row length data. |
| rowsize_end | One beyond the end of the row length data. |