19 #ifndef POSET_TRAVERSER_H 20 #define POSET_TRAVERSER_H 22 #ifndef SHEAF_DLL_SPEC_H 23 #include "SheafSystem/sheaf_dll_spec.h" 27 #include "SheafSystem/any.h" 30 #ifndef SCOPED_INDEX_H 31 #include "SheafSystem/scoped_index.h" 35 #include "SheafSystem/zn_to_bool.h" 41 class abstract_poset_member;
42 class poset_state_handle;
43 class poset_component;
44 class total_poset_member;
73 virtual bool invariant()
const;
156 return (*_visited)[xindex];
167 bool no_members_visited()
const;
172 bool all_members_visited()
const;
177 void mark_members_not_visited();
189 _visited->
force(xindex,
true);
197 _visited->
force(xindex,
false);
203 virtual void private_traverse() = 0;
210 if(_visited->
ub() < member_index_ub().
pod())
211 _visited->
extend_to(member_index_ub().pod());
const pod_type & pod() const
The "plain old data" storage of this; the value in the external id space.
zn_to_bool * _visited
The markers for previously visited members.
bool in_down_set() const
True if traversing down from anchor().
bool _in_down_set
True if traversing down from anchor().
A client handle for a general, abstract partially order set.
Abstract traverser (internal iterator) for poset.
int ub() const
The upper bound for the domain index.
Features shared by poset_member and subposet. Subposet and poset_member objects can be attached...
void mark_visited(int xindex)
Sets the visited markers true for the emebr with index xindex.
void ensure_visited_ub()
Ensures the visited bit vector is large enough.
bool has_been_visited(int xindex) const
True if the member with index xindex has been previously visited.
Abstract base class with useful features for all objects.
A map from Zn (the integers mod n) to bools. A characteristic function used to represent subsets of Z...
void mark_not_visited(int xindex)
Sets the visited markers false for the emebr with index xindex.
const poset_state_handle * host() const
The poset being traversed (const version).
An index within the external ("client") scope of a given id space.
abstract_poset_member * _anchor
The member which is the starting point of this traversal.
poset_state_handle * host()
The poset being traversed (mutable version).
Namespace for the sheaves component of the sheaf system.
poset_state_handle * _host
The poset being traversed.
An abstract client handle for a member of a poset.
void extend_to(int xub)
Make the upper bound at least xub.
void force(int i, bool value)
Sets the i-th member to value, extends the upper bound if necessary.