21 #include "SheafSystem/poset_orderer.h" 22 #include "SheafSystem/assert_contract.h" 23 #include "SheafSystem/poset_state_handle.h" 24 #include "SheafSystem/poset_member.h" 25 #include "SheafSystem/index_space_iterator.h" 26 #include "SheafSystem/subposet.h" 71 require(xlower_bound != 0 ?
has_same_host(xlower_bound) :
true);
72 require(unexecutable(xlower_bound != 0 ? jrm order is independent of anything below xlower_bound :
true));
73 require(unexecutable(only bottom has an empty
lower cover));
78 _lower_bound = xlower_bound;
86 ensure(unexecutable(jrm order consistent with jim order));
175 if( has_been_post_visited(other_mbr_index) &&
219 ensure(unexecutable(g has the proper
lower cover links w.r.t.xmbr));
249 result = result && (_post_visited != 0);
SHEAF_DLL_SPEC void lower(const met &xmetric, const ed &xvector, ed &xresult, bool xauto_access)
Lower vector (pre-allocated version for persistent type).
virtual bool invariant() const
Class invariant.
virtual bool is_jim(bool xin_current_version=true) const
True if this member is join irreducible in the current version of the host (xin_current_version == tr...
A client handle for a subposet.
virtual bool invariant() const
Class invariant.
virtual void new_link(pod_index_type xgreater, pod_index_type xlesser)
Insert a cover link from greater to lesser (that is, hub id xgreater covers hub id xlesser)...
poset_dft(const poset_state_handle *xhost)
Constructor.
const pod_type & pod() const
The "plain old data" storage of this; the value in the external id space.
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.
void traverse(const abstract_poset_member *xanchor, bool down, bool reset_markers=true)
Traverse the down set (down == true) or up set (down == false) of xanchor. If reset_markers, reset all visited markers to false before begining.
A client handle for a general, abstract partially order set.
virtual bool contains_member(pod_index_type xmbr_hub_id) const
True if this poset contains poset member with hub id xmbr_hub_id.
void previsit_action(abstract_poset_member *xmbr)
Previsit action for member, xmbr.
void postvisit_action(abstract_poset_member *xmbr)
Postvisit action for member, xmbr.
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.
bool cover_is_equal(bool xlower, pod_index_type xother_mbr_index) const
True if and only if the lower (xlower true) or upper (xlower false) cover of this contains the same m...
A map from Zn (the integers mod n) to bools. A characteristic function used to represent subsets of Z...
virtual void merge_jems(pod_index_type xjem1, pod_index_type xjem2)
Merge the join-equivalence class of hub id xjem2 under that of hub id xjem1.
bool is_done() const
True if iteration is finished.
bool has_same_host(const poset_component *other) const
True if other is not void and is attached to the same host as this.
bool _descend
If true on return from previsit_action, descend into lower cover previsit_action can truncate dft by ...
poset_orderer(poset_state_handle *xhost)
Constructor.
const bool UPPER
Selector for upper cover.
pod_index_type first_cover_member(bool xlower) const
The first member of the lower (xlower true) or upper (xlower false) cover of this.
void restore_order(subposet *xlower_bound=0)
Make jrm order consistent with jim order.
~poset_orderer()
Destructor.
bool cover_is_empty(bool xlower) const
True if and only if the lower (xlower true) or upper (xlower false) cover this is empty...
const bool LOWER
Selector for lower cover.
virtual pod_index_type greatest_jem(pod_index_type xmbr_hub_id) const
The hub id of the largest member which is join-equivalent to hub id xmbr_hub_id.
poset_state_handle * host()
The poset being traversed (mutable version).
int_type pod_index_type
The plain old data index type.
virtual bool is_jim(pod_index_type xmbr_hub_id, bool xin_current_version=true) const
True if the member with hub id xmbr_hub_id is a jim in the current version (xin_current_version == tr...
poset_state_handle * _host
The poset being traversed.
scoped_index member_index_ub() const
The upper bound on the member index.
An abstract client handle for a member of a poset.
Abstract traverser (internal iterator) for poset which traverses the cover relation graph in depth fi...
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().
void copy_cover(bool xlower, pod_index_type xmbr_hub_id, pod_index_type xother_mbr_hub_id)
Copies the lower (xlower true) or upper (xlower false) cover set of the member with hub id xmbr_hub_i...