Allows viewing a sparse table consisting out of C-array.
More...
#include <GridHelpers.hpp>
|
| SparseTableView (int *data, int *offset, std::size_t size_arg) |
| Creates a sparse table view. More...
|
|
row_type | operator[] (std::size_t row) const |
| Get a row of the the table. More...
|
|
std::size_t | size () const |
| Get the size of the table. More...
|
|
std::size_t | noEntries () const |
| Get the number of non-zero entries.
|
|
Allows viewing a sparse table consisting out of C-array.
This class can be used to convert two int array (like they are in UnstructuredGrid for representing the cell to faces mapping as a sparse table object.
◆ SparseTableView()
Opm::UgGridHelpers::SparseTableView::SparseTableView |
( |
int * |
data, |
|
|
int * |
offset, |
|
|
std::size_t |
size_arg |
|
) |
| |
|
inline |
Creates a sparse table view.
- Parameters
-
data | The array with data of the table. |
offset | The offsets of the rows. Row i starts at offset[i] and ends a offset[i+1] |
size | The number of entries/rows of the table |
◆ operator[]()
row_type Opm::UgGridHelpers::SparseTableView::operator[] |
( |
std::size_t |
row | ) |
const |
|
inline |
Get a row of the the table.
- Parameters
-
- Returns
- The corresponding row.
◆ size()
std::size_t Opm::UgGridHelpers::SparseTableView::size |
( |
| ) |
const |
|
inline |
Get the size of the table.
- Returns
- the number rows.
The documentation for this class was generated from the following file: