mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Added size() method to CellRange inner class.
This commit is contained in:
parent
9c047f4533
commit
a0d3bf6dd7
@ -92,6 +92,11 @@ namespace Opm
|
|||||||
*/
|
*/
|
||||||
typedef CellIter const_iterator;
|
typedef CellIter const_iterator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Size type for this range.
|
||||||
|
*/
|
||||||
|
typedef typename std::vector<CellId>::size_type size_type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Beginning of cell range.
|
* Beginning of cell range.
|
||||||
*/
|
*/
|
||||||
@ -102,6 +107,11 @@ namespace Opm
|
|||||||
*/
|
*/
|
||||||
const_iterator end() const { return e_; }
|
const_iterator end() const { return e_; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Number of elements in the range.
|
||||||
|
*/
|
||||||
|
size_type size() const { return e_ - b_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const_iterator b_;
|
const_iterator b_;
|
||||||
const_iterator e_;
|
const_iterator e_;
|
||||||
|
Loading…
Reference in New Issue
Block a user