SheafSystem
0.0.0.0
|
Traverser to ensure validity of order relation. More...
#include <poset_orderer.h>
POSET_ORDERER FACET | |
poset_orderer (poset_state_handle *xhost) | |
Constructor. More... | |
~poset_orderer () | |
Destructor. More... | |
void | restore_order (subposet *xlower_bound=0) |
Make jrm order consistent with jim order. More... | |
POSET_DFT FACET | |
void | previsit_action (abstract_poset_member *xmbr) |
Previsit action for member, xmbr. More... | |
void | link_action (abstract_poset_member *xmbr, abstract_poset_member *linked_mbr) |
Link action for member, xmbr; disabled. More... | |
void | postvisit_action (abstract_poset_member *xmbr) |
Postvisit action for member, xmbr. More... | |
ANY FACET | |
virtual bool | invariant () const |
Class invariant. More... | |
Additional Inherited Members | |
Public Member Functions inherited from sheaf::poset_dft | |
poset_dft (const poset_state_handle *xhost) | |
Constructor. More... | |
~poset_dft () | |
Destructor. More... | |
Public Member Functions inherited from sheaf::poset_traverser | |
poset_traverser (const poset_state_handle *xanchor) | |
Constructor. More... | |
~poset_traverser () | |
Destructor. More... | |
poset_state_handle * | host () |
The poset being traversed (mutable version). More... | |
const poset_state_handle * | host () const |
The poset being traversed (const version). More... | |
bool | has_same_host (const poset_component *other) const |
True if other is not void and is attached to the same host as this. More... | |
virtual abstract_poset_member * | anchor () |
The member which is the starting point of this traversal (mutable verison). More... | |
virtual const abstract_poset_member * | anchor () const |
The member which is the starting point of this traversal (const version). More... | |
bool | in_down_set () const |
True if traversing down from anchor(). More... | |
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. More... | |
Public Member Functions inherited from sheaf::any | |
virtual bool | is_ancestor_of (const any *other) const |
True if other conforms to this. More... | |
bool | is_same_type (const any *other) const |
True if other is the same type as this. More... | |
virtual any * | clone () const |
Virtual constructor, makes a new instance of 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::poset_dft | |
void | private_traverse () |
Implements the traversal. More... | |
void | recursive_dft (abstract_poset_member *xmbr) |
Protected Member Functions inherited from sheaf::poset_traverser | |
bool | has_been_visited (const abstract_poset_member *xmbr) const |
True if xmbr has been previously visited. More... | |
bool | has_been_visited (int xindex) const |
True if the member with index xindex has been previously visited. More... | |
scoped_index | member_index_ub () const |
The upper bound on the member index. More... | |
bool | no_members_visited () const |
True if no members have been visited. More... | |
bool | all_members_visited () const |
True if all members have been visited. More... | |
void | mark_members_not_visited () |
Sets the visited markers false for all members. More... | |
void | mark_visited (const abstract_poset_member *xmbr) |
Sets the visited marker true for xmbr. More... | |
void | mark_visited (int xindex) |
Sets the visited markers true for the emebr with index xindex. More... | |
void | mark_not_visited (int xindex) |
Sets the visited markers false for the emebr with index xindex. More... | |
void | ensure_visited_ub () |
Ensures the visited bit vector is large enough. More... | |
Protected Member Functions inherited from sheaf::any | |
any () | |
default constructor More... | |
Protected Attributes inherited from sheaf::poset_dft | |
bool | _descend |
If true on return from previsit_action, descend into lower cover previsit_action can truncate dft by setting this false. More... | |
std::stack< abstract_poset_member * > | _free_mbrs |
Storage for abstract_poset_member objects, so we can reuse them, rather than creating one for each member in the graph. More... | |
Protected Attributes inherited from sheaf::poset_traverser | |
poset_state_handle * | _host |
The poset being traversed. More... | |
zn_to_bool * | _visited |
The markers for previously visited members. More... | |
abstract_poset_member * | _anchor |
The member which is the starting point of this traversal. More... | |
bool | _in_down_set |
True if traversing down from anchor(). More... | |
Traverser to ensure validity of order relation.
Definition at line 46 of file poset_orderer.h.
sheaf::poset_orderer::poset_orderer | ( | poset_state_handle * | xhost | ) |
Constructor.
Definition at line 35 of file poset_orderer.cc.
References invariant(), sheaf::poset_traverser::member_index_ub(), sheaf::poset_dft::poset_dft(), and ~poset_orderer().
sheaf::poset_orderer::~poset_orderer | ( | ) |
Destructor.
Definition at line 54 of file poset_orderer.cc.
References restore_order().
Referenced by poset_orderer().
|
virtual |
Class invariant.
Reimplemented from sheaf::poset_traverser.
Definition at line 244 of file poset_orderer.cc.
References sheaf::poset_traverser::invariant().
Referenced by poset_orderer(), and postvisit_action().
|
inlineprotectedvirtual |
Link action for member, xmbr; disabled.
Implements sheaf::poset_dft.
Definition at line 114 of file poset_orderer.h.
|
protectedvirtual |
Postvisit action for member, xmbr.
Implements sheaf::poset_dft.
Definition at line 130 of file poset_orderer.cc.
References sheaf::poset_traverser::_host, sheaf::poset_state_handle::copy_cover(), sheaf::abstract_poset_member::cover_is_empty(), sheaf::abstract_poset_member::cover_is_equal(), sheaf::abstract_poset_member::first_cover_member(), sheaf::poset_state_handle::get_cover_id_space_iterator(), sheaf::poset_state_handle::greatest_jem(), sheaf::poset_traverser::has_been_visited(), sheaf::poset_traverser::has_same_host(), sheaf::poset_traverser::host(), sheaf::index_space_iterator::hub_pod(), sheaf::poset_component::index(), invariant(), sheaf::index_space_iterator::is_done(), sheaf::abstract_poset_member::is_jim(), sheaf::poset_state_handle::is_jim(), sheaf::LOWER, fiber_bundle::met_algebra::lower(), sheaf::poset_state_handle::merge_jems(), sheaf::poset_state_handle::new_link(), sheaf::index_space_iterator::next(), sheaf::scoped_index::pod(), sheaf::poset_state_handle::release_cover_id_space_iterator(), and sheaf::UPPER.
Referenced by previsit_action().
|
protectedvirtual |
Previsit action for member, xmbr.
Implements sheaf::poset_dft.
Definition at line 108 of file poset_orderer.cc.
References sheaf::poset_dft::_descend, sheaf::subposet::contains_member(), and postvisit_action().
Referenced by restore_order().
void sheaf::poset_orderer::restore_order | ( | subposet * | xlower_bound = 0 | ) |
Make jrm order consistent with jim order.
Definition at line 67 of file poset_orderer.cc.
References sheaf::poset_traverser::has_same_host(), sheaf::poset_traverser::host(), fiber_bundle::met_algebra::lower(), previsit_action(), and sheaf::poset_traverser::traverse().
Referenced by sheaf::poset_state_handle::ensure_lattice_invariant(), and ~poset_orderer().