SheafSystem
0.0.0.0
|
An iterator over the integers in an interval_set. More...
#include <interval_set_iterator.h>
INTERVAL_SET_ITERATOR FACET | |
typedef interval_set::pod_type | pod_type |
The "plain old data" index type for this. More... | |
typedef interval_set::map_type | map_type |
Type of the interval map. More... | |
typedef interval_set::map_iterator_type | map_iterator_type |
Type of the interval map iterator. More... | |
const interval_set * | _set |
The interval_set this is iterating over. More... | |
bool | _is_member_iterator |
True, if iterating over the members of the set. More... | |
pod_type | _item |
The current integer in the iteration. More... | |
pod_type | _ub |
The upper bound of the current interval. More... | |
const map_type * | _map |
The interval map. More... | |
map_iterator_type | _map_itr |
The interval map iterator. More... | |
interval_set_iterator (const interval_set &xset, bool xis_member_iterator) | |
Creates an iterator for xset. If xis_member_iterator, iterate over the members of the interval. Otherwise, iteration over the non-members within the range if the set. More... | |
interval_set_iterator (const interval_set_iterator &xother) | |
Copy constructor. More... | |
~interval_set_iterator () | |
Destructor. More... | |
const interval_set & | set () const |
The interval set this is iterating over. More... | |
bool | is_member_iterator () const |
True, if iterating over members. More... | |
pod_type | item () const |
The current integer of the iteration. More... | |
void | next () |
Makes item() the next integer in the iteration. More... | |
bool | is_done () const |
True if iteration is finished. More... | |
void | reset () |
Restarts the iteration. More... | |
interval_set_iterator () | |
Default constructor; disabled. More... | |
void | next_interval () |
Assign the item to the beginning of the next interval. More... | |
bool | is_member_interval () const |
True, if the current interval is an interval of members. More... | |
ANY FACET | |
virtual bool | is_ancestor_of (const any *other) const |
Conformance test; true if other conforms to this. More... | |
virtual interval_set_iterator * | clone () const |
Virtual constructor, makes a new instance of the same type as this. More... | |
interval_set_iterator & | operator= (const interval_set_iterator &xother) |
Assignment operator. More... | |
virtual bool | operator== (const interval_set_iterator &xother) const |
True if this is equivalent to xother. More... | |
virtual bool | invariant () const |
Class invariant. More... | |
Additional Inherited Members | |
Public Member Functions inherited from sheaf::any | |
bool | is_same_type (const any *other) const |
True if other is the same type as this. More... | |
virtual | ~any () |
Destructor. More... | |
bool | invariant_check () const |
True if invariant checking is enabled. More... | |
void | enable_invariant_check () const |
Enable invariant checking. More... | |
void | disable_invariant_check () const |
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More... | |
int | disable_invariance_check_request_depth () const |
Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More... | |
Protected Member Functions inherited from sheaf::any | |
any () | |
default constructor More... | |
An iterator over the integers in an interval_set.
Definition at line 42 of file interval_set_iterator.h.
Type of the interval map iterator.
Definition at line 154 of file interval_set_iterator.h.
|
protected |
Type of the interval map.
Definition at line 144 of file interval_set_iterator.h.
The "plain old data" index type for this.
Definition at line 55 of file interval_set_iterator.h.
sheaf::interval_set_iterator::interval_set_iterator | ( | const interval_set & | xset, |
bool | xis_member_iterator | ||
) |
Creates an iterator for xset. If xis_member_iterator, iterate over the members of the interval. Otherwise, iteration over the non-members within the range if the set.
Definition at line 31 of file interval_set_iterator.cc.
References _is_member_iterator, _map, _set, invariant(), reset(), and ~interval_set_iterator().
sheaf::interval_set_iterator::interval_set_iterator | ( | const interval_set_iterator & | xother | ) |
Copy constructor.
Definition at line 186 of file interval_set_iterator.cc.
References invariant(), and next_interval().
sheaf::interval_set_iterator::~interval_set_iterator | ( | ) |
Destructor.
Definition at line 53 of file interval_set_iterator.cc.
References set().
Referenced by interval_set_iterator().
|
inlineprotected |
Default constructor; disabled.
Definition at line 109 of file interval_set_iterator.h.
|
virtual |
Virtual constructor, makes a new instance of the same type as this.
Reimplemented from sheaf::any.
Definition at line 274 of file interval_set_iterator.cc.
References _is_member_iterator, _set, interval_set_iterator(), is_member_iterator(), sheaf::any::is_same_type(), operator=(), and set().
Referenced by is_ancestor_of().
|
virtual |
Class invariant.
Reimplemented from sheaf::any.
Definition at line 344 of file interval_set_iterator.cc.
References sheaf::any::disable_invariant_check(), sheaf::any::enable_invariant_check(), sheaf::any::invariant(), sheaf::any::invariant_check(), is_done(), is_member_interval(), and is_member_iterator().
Referenced by interval_set_iterator(), next(), operator=(), operator==(), and reset().
|
virtual |
Conformance test; true if other conforms to this.
Reimplemented from sheaf::any.
Definition at line 253 of file interval_set_iterator.cc.
References clone().
Referenced by is_member_interval().
bool sheaf::interval_set_iterator::is_done | ( | ) | const |
True if iteration is finished.
Definition at line 137 of file interval_set_iterator.cc.
References _map, _map_itr, and reset().
Referenced by invariant(), item(), next(), sheaf::hub_index_space_iterator::next(), next_interval(), sheaf::operator<<(), and sheaf::hub_index_space_iterator::reset().
|
protected |
True, if the current interval is an interval of members.
Definition at line 237 of file interval_set_iterator.cc.
References _map_itr, and is_ancestor_of().
Referenced by invariant(), and next_interval().
bool sheaf::interval_set_iterator::is_member_iterator | ( | ) | const |
True, if iterating over members.
Definition at line 77 of file interval_set_iterator.cc.
References _is_member_iterator, and item().
Referenced by clone(), invariant(), next_interval(), and set().
sheaf::interval_set_iterator::pod_type sheaf::interval_set_iterator::item | ( | ) | const |
The current integer of the iteration.
Definition at line 84 of file interval_set_iterator.cc.
References _item, is_done(), and next().
Referenced by is_member_iterator(), sheaf::hub_index_space_iterator::next(), sheaf::operator<<(), and sheaf::hub_index_space_iterator::reset().
void sheaf::interval_set_iterator::next | ( | ) |
Makes item() the next integer in the iteration.
Definition at line 101 of file interval_set_iterator.cc.
References _item, _map, _map_itr, _ub, sheaf::invalid_pod_index(), invariant(), is_done(), and next_interval().
Referenced by item(), sheaf::hub_index_space_iterator::next(), and sheaf::operator<<().
|
protected |
Assign the item to the beginning of the next interval.
Definition at line 205 of file interval_set_iterator.cc.
References _item, _map, _map_itr, _ub, sheaf::invalid_pod_index(), is_done(), is_member_interval(), and is_member_iterator().
Referenced by interval_set_iterator(), next(), and reset().
sheaf::interval_set_iterator & sheaf::interval_set_iterator::operator= | ( | const interval_set_iterator & | xother | ) |
Assignment operator.
Definition at line 298 of file interval_set_iterator.cc.
References _is_member_iterator, _item, _map, _map_itr, _set, _ub, invariant(), and operator==().
Referenced by clone().
|
virtual |
True if this is equivalent to xother.
Definition at line 322 of file interval_set_iterator.cc.
References _is_member_iterator, _item, _map, _map_itr, _set, _ub, and invariant().
Referenced by operator=().
void sheaf::interval_set_iterator::reset | ( | ) |
Restarts the iteration.
Definition at line 156 of file interval_set_iterator.cc.
References _is_member_iterator, _map, _map_itr, interval_set_iterator(), invariant(), and next_interval().
Referenced by interval_set_iterator(), is_done(), and sheaf::hub_index_space_iterator::reset().
const sheaf::interval_set & sheaf::interval_set_iterator::set | ( | ) | const |
The interval set this is iterating over.
Definition at line 70 of file interval_set_iterator.cc.
References _set, and is_member_iterator().
Referenced by clone(), and ~interval_set_iterator().
|
protected |
True, if iterating over the members of the set.
Definition at line 129 of file interval_set_iterator.h.
Referenced by clone(), interval_set_iterator(), is_member_iterator(), operator=(), operator==(), and reset().
|
protected |
The current integer in the iteration.
Definition at line 134 of file interval_set_iterator.h.
Referenced by item(), next(), next_interval(), operator=(), and operator==().
|
protected |
The interval map.
Definition at line 149 of file interval_set_iterator.h.
Referenced by interval_set_iterator(), is_done(), next(), next_interval(), operator=(), operator==(), and reset().
|
protected |
The interval map iterator.
Definition at line 159 of file interval_set_iterator.h.
Referenced by is_done(), is_member_interval(), next(), next_interval(), operator=(), operator==(), and reset().
|
protected |
The interval_set this is iterating over.
Definition at line 124 of file interval_set_iterator.h.
Referenced by clone(), interval_set_iterator(), operator=(), operator==(), and set().
|
protected |
The upper bound of the current interval.
Definition at line 139 of file interval_set_iterator.h.
Referenced by next(), next_interval(), operator=(), and operator==().