Range iterator with size counting More...
#include <ranges-size.hpp>
Protected Attributes | |
I | i |
Iterator to compute size of. More... | |
unsigned int | _size |
Accumulated size. More... | |
Constructors and initialization | |
Size (void) | |
Default constructor. More... | |
Size (I &i) | |
Initialize with ranges from i. More... | |
void | init (I &i) |
Initialize with ranges from i. More... | |
Iteration control | |
bool | operator() (void) |
Test whether iterator is still at a range or done. More... | |
void | operator++ (void) |
Move iterator to next range (if possible) More... | |
Range access | |
int | min (void) const |
Return smallest value of range. More... | |
int | max (void) const |
Return largest value of range. More... | |
unsigned int | width (void) const |
Return width of range (distance between minimum and maximum) More... | |
Size access | |
unsigned int | size (void) const |
Return accumulated size. More... | |
Range iterator with size counting
Allows to iterate the ranges as defined by the input iterator and access the size of the set already iterated. After complete iteration, the reported size is thus the size of the set.
Definition at line 50 of file ranges-size.hpp.
|
inline |
Default constructor.
Definition at line 95 of file ranges-size.hpp.
|
inline |
Initialize with ranges from i.
Definition at line 107 of file ranges-size.hpp.
|
inline |
Initialize with ranges from i.
Definition at line 100 of file ranges-size.hpp.
|
inline |
Test whether iterator is still at a range or done.
Definition at line 117 of file ranges-size.hpp.
|
inline |
Move iterator to next range (if possible)
Definition at line 111 of file ranges-size.hpp.
|
inline |
Return smallest value of range.
Definition at line 123 of file ranges-size.hpp.
|
inline |
Return largest value of range.
Definition at line 128 of file ranges-size.hpp.
|
inline |
Return width of range (distance between minimum and maximum)
Definition at line 133 of file ranges-size.hpp.
|
inline |
Return accumulated size.
Definition at line 139 of file ranges-size.hpp.
|
protected |
Iterator to compute size of.
Definition at line 53 of file ranges-size.hpp.
|
protected |
Accumulated size.
Definition at line 55 of file ranges-size.hpp.