20 #include "SheafSystem/interval_set_iterator.h" 22 #include "SheafSystem/assert_contract.h" 38 _map = &xset._interval_map;
288 ensure(
set() == result->
set());
328 bool result = (
_set == xother.
_set);
331 result = result && (
_ub == xother.
_ub);
332 result = result && (
_map == xother.
_map);
virtual bool invariant() const
Class invariant, intended to be redefined in each descendant. See below for template for invariant in...
An iterator over the integers in an interval_set.
Set of integers optimized for when the integers are concentrated in closed intervals.
pod_type _ub
The upper bound of the current interval.
~interval_set_iterator()
Destructor.
virtual bool operator==(const interval_set_iterator &xother) const
True if this is equivalent to xother.
interval_set_iterator()
Default constructor; disabled.
virtual bool is_ancestor_of(const any *other) const
Conformance test; true if other conforms to this.
void reset()
Restarts the iteration.
virtual bool invariant() const
Class invariant.
interval_set_iterator & operator=(const interval_set_iterator &xother)
Assignment operator.
bool is_member_interval() const
True, if the current interval is an interval of members.
const map_type * _map
The interval map.
Abstract base class with useful features for all objects.
map_iterator_type _map_itr
The interval map iterator.
const interval_set * _set
The interval_set this is iterating over.
void next_interval()
Assign the item to the beginning of the next interval.
pod_type item() const
The current integer of the iteration.
void disable_invariant_check() const
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing inv...
bool _is_member_iterator
True, if iterating over the members of the set.
void next()
Makes item() the next integer in the iteration.
interval_set::pod_type pod_type
The "plain old data" index type for this.
bool invariant_check() const
True if invariant checking is enabled.
const interval_set & set() const
The interval set this is iterating over.
bool is_member_iterator() const
True, if iterating over members.
pod_type _item
The current integer in the iteration.
SHEAF_DLL_SPEC pod_index_type invalid_pod_index()
The invalid pod index value.
bool is_same_type(const any *other) const
True if other is the same type as this.
bool is_done() const
True if iteration is finished.
void enable_invariant_check() const
Enable invariant checking.
virtual interval_set_iterator * clone() const
Virtual constructor, makes a new instance of the same type as this.