22 #include "SheafSystem/poset_dft.h" 25 #include "SheafSystem/abstract_poset_member.h" 26 #include "SheafSystem/assert_contract.h" 27 #include "SheafSystem/poset.h" 28 #include "SheafSystem/total_poset_member.h" 29 #include "SheafSystem/index_space_iterator.h" 30 #include "SheafSystem/zn_to_bool.h" 83 ensure(unexecutable(traversal truncated or all members <=
anchor() visited));
106 previsit_action(xmbr);
161 linked_mbr->
put_version(COARSEST_COMMON_REFINEMENT_VERSION);
192 link_action(xmbr, linked_mbr);
216 postvisit_action(xmbr);
221 ensure(unexecutable(traversal truncated or all members <= xmbr visited));
virtual void put_version(int xversion, bool xunalias=false)
Sets version to (possibly aliased) xversion. If unalias == true, set version to the actual version al...
virtual bool invariant() const
Class invariant.
poset_dft(const poset_state_handle *xhost)
Constructor.
An abstract iterator over the ids of an id space.
index_space_iterator & get_cover_id_space_iterator(bool xlower, pod_index_type xmbr_hub_id) const
Allocates an iterator for the lower (xlower true) or upper (xlower false) cover id space of the membe...
bool has_been_visited(const abstract_poset_member *xmbr) const
True if xmbr has been previously visited.
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.
virtual abstract_poset_member * anchor()
The member which is the starting point of this traversal (mutable verison).
const scoped_index & index() const
The index of the component state this handle is attached to.
virtual void next()=0
Makes id() the next id in the iteration.
void ensure_visited_ub()
Ensures the visited bit vector is large enough.
bool is_done() const
True if iteration is finished.
bool _descend
If true on return from previsit_action, descend into lower cover previsit_action can truncate dft by ...
abstract_poset_member * _anchor
The member which is the starting point of this traversal.
std::stack< abstract_poset_member * > _free_mbrs
Storage for abstract_poset_member objects, so we can reuse them, rather than creating one for each me...
abstract_poset_member * clone(bool xnew_state, bool xauto_access=true) const
Virtual constructor; makes a new handle of the same type as this, attached to a new state (xnew_state...
virtual void detach_from_state()
Detach this handle from its state, if any.
void private_traverse()
Implements the traversal.
void mark_visited(const abstract_poset_member *xmbr)
Sets the visited marker true for xmbr.
void recursive_dft(abstract_poset_member *xmbr)
poset_state_handle * host()
The poset being traversed (mutable version).
void attach_to_state(const namespace_poset *xns, const poset_path &xpath, bool xauto_access=true)
Attach to the state specified by path xpath in the namespace xns.
An abstract client handle for a member of a poset.
void release_cover_id_space_iterator(index_space_iterator &xcover_itr) const
Returns xcover_itr to the pool of id space iterators.
pod_type hub_pod() const
The current unglued hub id in the iteration. synonym for unglued_hub_pod().