Loading...
Searching...
No Matches
Opm::UgGridHelpers::SparseTableView Class Reference

Allows viewing a sparse table consisting out of C-array. More...

`#include <GridHelpers.hpp>`

## Public Types

using | row_type = iterator_range_pod<int>
| The type of the roww.

## Public Member Functions

| SparseTableView (int *data, unsigned *offset, std::size_t size_arg)
| Creates a sparse table view.
row_type | operator[] (std::size_t row) const
| Get a row of the the table.
std::size_t | size () const
| Get the size of the table.
std::size_t | noEntries () const
| Get the number of non-zero entries.

## Detailed Description

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.

## Constructor & Destructor Documentation

## SparseTableView()

Opm::UgGridHelpers::SparseTableView::SparseTableView | ( | int * | data,
|  | unsigned * | 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_arg | The number of entries/rows of the table

## Member Function Documentation

## operator[]()

row_type Opm::UgGridHelpers::SparseTableView::operator[] | ( | std::size_t | row | ) | const

inline

Get a row of the the table.

Parameters

  row | The row index.

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:

- opm/grid/GridHelpers.hpp