Added size() method to CellRange inner class.

This commit is contained in:
Atgeirr Flø Rasmussen
2014-02-27 08:58:38 +01:00
parent 7cc0802f3e
commit 283dc96776

View File

@@ -92,6 +92,11 @@ namespace Opm
*/
typedef CellIter const_iterator;
/**
* Size type for this range.
*/
typedef typename std::vector<CellId>::size_type size_type;
/**
* Beginning of cell range.
*/
@@ -102,6 +107,11 @@ namespace Opm
*/
const_iterator end() const { return e_; }
/**
* Number of elements in the range.
*/
size_type size() const { return e_ - b_; }
private:
const_iterator b_;
const_iterator e_;