SheafSystem  0.0.0.0
sheaf::depth_first_iterator Class Reference

#include <depth_first_iterator.h>

Inheritance diagram for sheaf::depth_first_iterator:
sheaf::any fiber_bundle::discretization_iterator fiber_bundle::eval_iterator fields::field_eval_iterator fields::property_disc_iterator sheaf::filtered_depth_first_iterator fields::property_disc_iterator_1_1 fields::property_disc_iterator_1_2 fields::property_disc_iterator_1_3 fields::property_disc_iterator_4_2 fields::property_disc_iterator_4_3 sheaf::biorder_iterator sheaf::linkorder_iterator sheaf::postorder_iterator sheaf::preorder_iterator sheaf::triorder_iterator tool::visualization_iterator

Public Types

enum  order_type {
  PREORDER, POSTORDER, LINKORDER, BIORDER,
  TRIORDER, NOT_AN_ORDER
}
 The types of order in which the iterator will visit the members of the poset. Determines which actions are exported to the client. More...
 
enum  action_type { PREVISIT_ACTION, LINK_ACTION, POSTVISIT_ACTION, NOT_AN_ACTION }
 The types of action a client should take when the iterator returns control to the client. More...
 

Public Member Functions

depth_first_iteratoroperator= (const depth_first_iterator &xother)
 Assignment operator. More...
 
virtual ~depth_first_iterator ()
 Destructor. More...
 
virtual bool is_ancestor_of (const any *other) const
 True if other conforms to this. More...
 
virtual depth_first_iteratorclone () const
 Make a new instance of the same type as this. More...
 
bool invariant () const
 The class invariant. More...
 
order_type order () const
 The order of the iteration. Determines which actions are exported to the client. More...
 
virtual bool is_initialized () const
 True if this has been initialized for iteration with respect to a specific anchor. More...
 
virtual abstract_poset_memberanchor ()
 The poset member whose downset is being iterated over; the top member of the domain of iteration (mutable version). More...
 
virtual const abstract_poset_memberanchor () const
 The poset member whose downset is being iterated over; the top member of the domain of iteration (const version). More...
 
virtual bool anchor_is_ancestor_of (const abstract_poset_member &xmbr) const
 True if xmbr conforms to the type of anchor of this. More...
 
bool descending () const
 True if iterating over down set of anchor. More...
 
bool strict () const
 True if iterating over xstrict up/down set of anchor. More...
 
subposetfilter ()
 The subposet which is the filter; Defines what is passed, not what is blocked. More...
 
bool is_done () const
 True if iteration finished. More...
 
virtual void force_is_done ()
 Force the iterator to be done. More...
 
void next ()
 Makes this the next member of the subset. More...
 
void truncate ()
 Makes this the next member of the subset which is not less than old this, i.e. the depth-first descent is truncated and the cover of this is not visited. More...
 
virtual void next (bool xtruncate)
 Makes this the next member of the subset. If action() == PREVISIT_ACTION and xtruncate, new this is not less than old this, i.e. the depth-first descent is truncated and the cover of this is not visited. If action() != PREVISIT_ACTION, xtruncate is ignored. More...
 
virtual void reset (bool xreset_markers=true)
 Restarts the iteration over the down set of anchor(). More...
 
int ct (bool xreset=false)
 The number of members of the iteration set, from the current member to the end, inclusive. If xreset, reset before computing the count. More...
 
bool has_visited (pod_index_type xhub_id) const
 True if this has already visited member with hub id xhub_id. More...
 
bool has_visited (const scoped_index &xid) const
 True if this has already visited member with id xid. More...
 
bool has_visited (const abstract_poset_member *xmbr) const
 True if this has already visited member xmbr. More...
 
void put_has_visited (pod_index_type xhub_id, bool xvalue)
 Set the visited marker for hub id xhub_id to xvalue. Intended for use reseting iterator without having to reset entire collection of markers. More...
 
void put_has_visited (const scoped_index &xid, bool xvalue)
 Set the visisted marker for id xid to xvalue. Intended for use reseting iterator without having to reset entire collection of markers. More...
 
bool visit_once () const
 True if traversal should only visit a member once; that is, it should not revisit members it has already visited. More...
 
void put_visit_once (bool xvisit_once)
 Set visit_once() to xvisit_once. More...
 
bool is_maximal () const
 True if the current member has no greater member within the subposet visited by this iterator. More...
 
const scoped_indexgreater_index () const
 The index of the greater member of the current link. More...
 
const scoped_indexlesser_index () const
 The index of the lesser member of the current link. More...
 
action_type action () const
 The type of action the client should take when the iterator returns control to the client. More...
 
void erase_cover ()
 Schedules the lesser member entry in the cover of the greater member of the current link for deletion on the next call to next(). Warning: this function can change the state of the the cover relation graph in unpredictable ways. Use only if you know what you are doing. More...
 
const scoped_indexindex () const
 The index of the current member of the iteration. More...
 
size_t depth () const
 The length of the path from anchor() to the current member. More...
 
- 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...
 

Static Public Attributes

static const char * NULL_FILTER = ""
 Placeholder for null filter. More...
 

Protected Types

enum  iterator_state {
  FIRST, INIT_COVER_ITERATOR, TEST_HAS_VISITED, INC_COVER_ITERATOR,
  ERASE_COVER_ITERATOR, DESCEND, TEST_PATH_TAIL, ASCEND,
  EXECUTE_PREVISIT_ACTION, EXECUTE_LINK_ACTION, EXECUTE_POSTVISIT_ACTION, FINISH,
  NOT_A_STATE
}
 The states for the finite state machine that controls iteration. More...
 
enum  iterator_token { PASS, FAIL }
 The input tokens for the finite state machine. More...
 
typedef const iterator_state(* transition_fcn_type)[FAIL+1]
 

Protected Member Functions

 depth_first_iterator ()
 Default constructor; creates an unattached iterator,. More...
 
 depth_first_iterator (const depth_first_iterator &xother)
 Copy constructor. More...
 
void first ()
 Moves this to the first member of the iteration. More...
 
void mark_visited (abstract_poset_member *xmbr)
 Mark xmbr as visited. Warning: this function can change the state of the iteration in unpredictable ways. Use only if you know what you are doing. More...
 
void mark_not_visited (abstract_poset_member *xmbr)
 Mark xmbr as not visited. Warning: this function can change the state of the iteration in unpredictable ways. Use only if you know what you are doing. More...
 
virtual void attach_item ()
 Attaches the item handle to the current index. Empty in this class; intended for redefinition in descendants. More...
 
virtual void detach_item ()
 Detaches the item handle to the current index. Empty in this class; intended for redefinition in descendants. More...
 
void initialize_order (order_type xorder)
 Initializes _order and _transition_fcn. More...
 
void initialize_traversal (const abstract_poset_member &xanchor)
 Initializes the anchor, has_visited markers and filter. More...
 
void initialize_traversal (pod_index_type xanchor_hub_id)
 Initializes the anchor, has_visited markers and filter. More...
 
void initialize_traversal (const scoped_index &xanchor_id)
 Initializes the anchor, has_visited markers and filter. More...
 
void initialize_anchor (const abstract_poset_member &xanchor)
 Initializes the anchor. More...
 
virtual void initialize_has_visited (const abstract_poset_member &xanchor)
 Initializes the has_visited markers. More...
 
zn_to_boolhas_visited () const
 The marker bit vector. /. More...
 
void put_has_visited (zn_to_bool *xhas_visited)
 Sets _has_visited to xhas_visited. /. More...
 
bool filter (pod_index_type xhub_id) const
 The value of the filter at hub id xhub_id. More...
 
bool filter (const scoped_index &xid) const
 The value of the filter at id xid. More...
 
void initialize_filter ()
 Initializes the filter subposet from the client filter. More...
 
void initialize_filter (const subposet &xfilter)
 Initializes the client filter to xfilter then initializes the filter from the client filter. More...
 
void initialize_filter (pod_index_type xfilter_hub_id)
 Initializes the client filter to the subposet with hub id xfilter_hub_id then initializes the filter from the client filter. More...
 
void initialize_filter (const scoped_index &xfilter_id)
 Initializes the client filter to the subposet with id xfilter_id then initializes the filter from the client filter. More...
 
void initialize_filter (const std::string &xfilter_name)
 Initializes the client filter to the subposet with name xfilter_name then initializes the filter from the client filter. More...
 
void release_cover_id_space_iterators ()
 Release the cover iterators back to the pool of iterators. More...
 
- Protected Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 

Protected Attributes

abstract_poset_member_anchor
 The top member of the down set being iterated over. More...
 
action_type _action
 The type of action the client should take; the state of the iterator. More...
 
scoped_index _index
 The index of the lesser end of the current link; the current item in the iteration. More...
 
scoped_index _greater_index
 The index of the greater member of the current link. More...
 
scoped_index _lesser_index
 The index of the lesser member of the current link. More...
 
subposet _client_filter
 The filter specified by the client. More...
 
bool _new_filter
 True if this allocated a new filter;. More...
 
bool _descending
 True if iterating over the up/down set of anchor. More...
 
bool _strict
 True if iterating over the strict up/down set of anchor. More...
 
order_type _order
 The order of the iteration. More...
 
const iterator_state(* _transition_fcn )[FAIL+1]
 The current state transition function for the iterator finite state machine. Points to one of the predefined transition functions. More...
 
iterator_state _state
 The current state of iteration. More...
 
index_space_iterator_path_head_lc
 The lower cover iterator for the head of the path to the current member of the iteration. More...
 
index_space_iterator_path_head
 The head of the path to the current member of the iteration lesser_index() == this->index() == **_path_head == lesser member of current link. More...
 
std::stack< index_space_iterator * > _path_tail
 The tail of the path to the current member of the iteration greater_index() == **(_path_tail.top()) == greater member of current link. More...
 
std::stack< pod_index_type_filtered_path_tail
 The tail of the filtered path to the current member of the iteration. Contains only members which pass the filter; equivalent to the path in the subposet selected by the filter. More...
 
bool _visit_once
 True if traversal should only visit a member once; that is, it should not revisit members it has already visited. More...
 

Static Protected Attributes

static const char * iterator_state_names [NOT_A_STATE+1]
 The names of the iterator states, convenient for debugging. More...
 
static const iterator_state PREORDER_TRANSITION_FCN [NOT_A_STATE-1][FAIL+1]
 The predefined transition function for postorder iteration. Defines the next state for each combination of state and input token, except for state FINISH, which is always a terminal state. More...
 
static const iterator_state POSTORDER_TRANSITION_FCN [NOT_A_STATE-1][FAIL+1]
 The predefined transition function for postorder iteration. Defines the next state for each combination of state and input token, except for state FINISH, which is always a terminal state. More...
 
static const iterator_state LINKORDER_TRANSITION_FCN [NOT_A_STATE-1][FAIL+1]
 The predefined transition function for linkorder iteration. Defines the next state for each combination of state and input token, except for state FINISH, which is always a terminal state. More...
 
static const iterator_state BIORDER_TRANSITION_FCN [NOT_A_STATE-1][FAIL+1]
 The predefined transition function for biorder iteration. Defines the next state for each combination of state and input token, except for state FINISH, which is always a terminal state. More...
 
static const iterator_state TRIORDER_TRANSITION_FCN [NOT_A_STATE-1][FAIL+1]
 The predefined transition function for triorder iteration. Defines the next state for each combination of state and input token, except for state FINISH, which is always a terminal state. More...
 
static const transition_fcn_type STD_TRANSITION_FCNS [NOT_AN_ORDER+1]
 The set of predefined transition functions. More...
 

Detailed Description

Deprecated:
Use depth_first_tr The general depth-first iterator over the intersection of a poset member anchor's whole with its down set. Implemented as a finite state machine with a client selectable state transition function that can be chosen to provide various iteration orders.

The iterator returns control to the client so that the it can perform client-defined actions. There are three action types, the PREVISIT_ACTION, the POSTVISIT_ACTION, and the LINK_ACTION, each associated with specific positions in the iteration. The previsit position is immediately before iteration over the cover of the current member begins. The postvisit position is immediately after iteration over the cover ends. The link position is on the current link, immediately after the lesser end of the link has been visited and context has ascended to the current link. The link action thus immediately follows the postvisit action of the lesser member, but the context is different.

This iterator visits every link in the cover relation graph below the anchor of the iteration, maintaining a path to the current member. Conceptually, the path is a list of pointers to lower cover iterators. The current member of each iterator is a node in the path. Physically, the path is stored in two parts. _index is the head of the list. The tail of the list is stored in the variable _path. The current link in the graph is the link between the front of _path and _index, with _index being the lesser member of the link.

Definition at line 79 of file depth_first_iterator.h.

Member Enumeration Documentation

◆ action_type

The types of action a client should take when the iterator returns control to the client.

Definition at line 168 of file depth_first_iterator.h.

◆ iterator_state

The states for the finite state machine that controls iteration.

Definition at line 556 of file depth_first_iterator.h.

◆ iterator_token

The input tokens for the finite state machine.

Definition at line 576 of file depth_first_iterator.h.

◆ order_type

The types of order in which the iterator will visit the members of the poset. Determines which actions are exported to the client.

Definition at line 154 of file depth_first_iterator.h.

Constructor & Destructor Documentation

◆ ~depth_first_iterator()

sheaf::depth_first_iterator::~depth_first_iterator ( )
virtual

◆ depth_first_iterator() [1/2]

sheaf::depth_first_iterator::depth_first_iterator ( )
protected

Default constructor; creates an unattached iterator,.

Postcondition
  • !is_initialized()
  • !strict()

Definition at line 1171 of file depth_first_iterator.cc.

References _action, _anchor, _descending, _index, _new_filter, _path_head, _path_head_lc, _state, _strict, _visit_once, descending(), initialize_order(), sheaf::scoped_index::invalidate(), invariant(), is_done(), is_initialized(), order(), strict(), and visit_once().

Referenced by clone(), and depth().

◆ depth_first_iterator() [2/2]

sheaf::depth_first_iterator::depth_first_iterator ( const depth_first_iterator xother)
protected

Copy constructor.

Postcondition
  • -unexecutable( this is first member of iteration or is_done() )

Definition at line 1210 of file depth_first_iterator.cc.

References _anchor, _new_filter, _path_head, _path_head_lc, anchor(), descending(), filter(), first(), invariant(), is_done(), is_initialized(), sheaf::NO_RESET, operator=(), order(), reset(), strict(), sheaf::poset_component::version(), and visit_once().

Member Function Documentation

◆ action()

◆ anchor() [1/2]

◆ anchor() [2/2]

const sheaf::abstract_poset_member & sheaf::depth_first_iterator::anchor ( ) const
virtual

The poset member whose downset is being iterated over; the top member of the domain of iteration (const version).

Precondition

Definition at line 233 of file depth_first_iterator.cc.

References _anchor, anchor_is_ancestor_of(), and is_initialized().

◆ anchor_is_ancestor_of()

bool sheaf::depth_first_iterator::anchor_is_ancestor_of ( const abstract_poset_member xmbr) const
virtual

True if xmbr conforms to the type of anchor of this.

Definition at line 252 of file depth_first_iterator.cc.

References descending().

Referenced by anchor(), initialize_anchor(), initialize_traversal(), and sheaf::filtered_depth_first_iterator::put_anchor().

◆ attach_item()

void sheaf::depth_first_iterator::attach_item ( )
protectedvirtual

Attaches the item handle to the current index. Empty in this class; intended for redefinition in descendants.

Definition at line 1418 of file depth_first_iterator.cc.

References detach_item().

Referenced by mark_not_visited(), and next().

◆ clone()

◆ ct()

int sheaf::depth_first_iterator::ct ( bool  xreset = false)

The number of members of the iteration set, from the current member to the end, inclusive. If xreset, reset before computing the count.

Precondition
  • xreset ? anchor().state_is_read_accessible(): true
Postcondition
  • result >= 0

Definition at line 859 of file depth_first_iterator.cc.

References anchor(), has_visited(), is_done(), is_initialized(), next(), and reset().

Referenced by sheaf::filtered_depth_first_member_iterator::ct(), fiber_bundle::eval_iterator::discretization_client_id(), and reset().

◆ depth()

size_t sheaf::depth_first_iterator::depth ( ) const

The length of the path from anchor() to the current member.

Precondition
  • !is_done()

Definition at line 1148 of file depth_first_iterator.cc.

References _path_tail, depth_first_iterator(), and is_done().

Referenced by index(), fields::field_eval_iterator::next(), fields::field_eval_iterator::refinement_depth(), and fields::field_eval_iterator::repeat().

◆ descending()

◆ detach_item()

void sheaf::depth_first_iterator::detach_item ( )
protectedvirtual

Detaches the item handle to the current index. Empty in this class; intended for redefinition in descendants.

Definition at line 1435 of file depth_first_iterator.cc.

References initialize_order().

Referenced by attach_item(), and next().

◆ erase_cover()

void sheaf::depth_first_iterator::erase_cover ( )

Schedules the lesser member entry in the cover of the greater member of the current link for deletion on the next call to next(). Warning: this function can change the state of the the cover relation graph in unpredictable ways. Use only if you know what you are doing.

Precondition

Definition at line 1106 of file depth_first_iterator.cc.

References _state, action(), and index().

Referenced by action().

◆ filter() [1/3]

◆ filter() [2/3]

bool sheaf::depth_first_iterator::filter ( pod_index_type  xhub_id) const
inlineprotected

The value of the filter at hub id xhub_id.

Definition at line 454 of file depth_first_iterator.h.

◆ filter() [3/3]

bool sheaf::depth_first_iterator::filter ( const scoped_index xid) const
inlineprotected

The value of the filter at id xid.

Definition at line 462 of file depth_first_iterator.h.

References sheaf::scoped_index::hub_pod().

◆ first()

◆ force_is_done()

◆ greater_index()

◆ has_visited() [1/4]

bool sheaf::depth_first_iterator::has_visited ( pod_index_type  xhub_id) const

True if this has already visited member with hub id xhub_id.

Precondition
  • anchor().host()->contains_member(xhub_id, true)

Definition at line 891 of file depth_first_iterator.cc.

References anchor(), has_visited(), and is_initialized().

Referenced by sheaf::subposet::extremals_pa(), and sheaf::filtered_depth_first_member_iterator::has_visited().

◆ has_visited() [2/4]

bool sheaf::depth_first_iterator::has_visited ( const scoped_index xid) const

True if this has already visited member with id xid.

Precondition
  • anchor().host()->contains_member(xid, true)

Definition at line 908 of file depth_first_iterator.cc.

References anchor(), has_visited(), sheaf::scoped_index::hub_pod(), and is_initialized().

◆ has_visited() [3/4]

bool sheaf::depth_first_iterator::has_visited ( const abstract_poset_member xmbr) const

True if this has already visited member xmbr.

Precondition
  • xmbr != 0
  • xmbr->is_attached()
  • anchor().host()->is_same_state(xmbr->host())

Definition at line 925 of file depth_first_iterator.cc.

References anchor(), sheaf::poset_component::host(), sheaf::scoped_index::hub_pod(), sheaf::poset_component::index(), sheaf::poset_component::is_attached(), is_initialized(), and put_has_visited().

◆ has_visited() [4/4]

sheaf::zn_to_bool * sheaf::depth_first_iterator::has_visited ( ) const
protected

The marker bit vector. /.

Hack:
temporary support for obsolete "multivalued" / feature of discretization_iterator; will be removed when / discretization_iterator updated. /

Definition at line 1689 of file depth_first_iterator.cc.

References put_has_visited().

Referenced by ct(), fields::field_eval_iterator::enough_capacity(), has_visited(), fiber_bundle::discretization_iterator::initialize_has_visited(), initialize_has_visited(), mark_not_visited(), mark_visited(), next(), put_has_visited(), fields::field_eval_iterator::update_capacity(), and fiber_bundle::discretization_iterator::~discretization_iterator().

◆ index()

const sheaf::scoped_index & sheaf::depth_first_iterator::index ( ) const

The index of the current member of the iteration.

Precondition
  • !is_done()
Postcondition

Definition at line 1127 of file depth_first_iterator.cc.

References _index, action(), depth(), greater_index(), is_done(), and lesser_index().

Referenced by fields::base_space_map::base_space_map(), tool::vtk_unstructured_grid_builder::build_pa(), fiber_bundle::base_space_member::c_minus(), fiber_bundle::base_space_member::c_not_pa(), fiber_bundle::eval_iterator::client_id(), fields::field_eval_iterator::db(), fiber_bundle::eval_iterator::db(), fiber_bundle::base_space_member::db(), fiber_bundle::sec_rep_space_member::discretization_ct(), erase_cover(), fiber_bundle::sec_rep_space_member::evaluation_ct(), sheaf::subposet::extremals_pa(), sheaf::filtered_depth_first_iterator::filtered_depth_first_iterator(), initialize_traversal(), fiber_bundle::discretization_iterator::next(), fiber_bundle::eval_iterator::next(), fields::field_eval_iterator::next(), fields::refining_section_pusher::push(), sheaf::filtered_depth_first_iterator::put_anchor(), sheaf::filtered_depth_first_iterator::put_filter(), fiber_bundle::unstructured_block_builder::put_name_mode(), fiber_bundle::discretization_iterator::put_schema_anchor(), fiber_bundle::eval_iterator::put_schema_anchor(), fields::field_refiner::refine(), fields::section_pusher::section_pusher(), fields::field_eval_iterator::type_id(), fiber_bundle::eval_iterator::type_id(), fields::field_eval_iterator::type_name(), geometry::d_bin_point_locator< DC, DB >::update(), geometry::cylindrical_point_locator::update(), geometry::db0_point_locator< DC >::update(), geometry::point_locator::update_domain(), fiber_bundle::binary_section_dof_iterator::update_item(), and sheaf::filtered_depth_first_member_iterator::update_item().

◆ initialize_anchor()

void sheaf::depth_first_iterator::initialize_anchor ( const abstract_poset_member xanchor)
protected

◆ initialize_filter() [1/5]

◆ initialize_filter() [2/5]

void sheaf::depth_first_iterator::initialize_filter ( const subposet xfilter)
protected

Initializes the client filter to xfilter then initializes the filter from the client filter.

Precondition
  • _anchor != 0
  • _anchor->state_is_read_accessible()
  • _anchor->host()->includes_subposet(&xfilter)
Postcondition
  • _filter != 0
  • _client_filter.is_same_state(&xfilter)

Definition at line 1776 of file depth_first_iterator.cc.

References _anchor, _client_filter, _descending, _strict, sheaf::poset_component::attach_to_state(), descending(), sheaf::poset_component::host(), sheaf::poset_state_handle::includes_subposet(), initialize_filter(), invariant(), is_done(), sheaf::poset_component::is_same_state(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and strict().

◆ initialize_filter() [3/5]

void sheaf::depth_first_iterator::initialize_filter ( pod_index_type  xfilter_hub_id)
protected

Initializes the client filter to the subposet with hub id xfilter_hub_id then initializes the filter from the client filter.

Precondition
  • _anchor != 0
  • _anchor->state_is_read_accessible()
  • _anchor->host()->includes_subposet(xfilter_hub_id)
Postcondition
  • _filter != 0
  • _client_filter.index() == xfilter_hub_id

Definition at line 1811 of file depth_first_iterator.cc.

References _anchor, _client_filter, sheaf::poset_component::attach_to_state(), sheaf::poset_component::host(), sheaf::poset_state_handle::includes_subposet(), sheaf::poset_component::index(), initialize_filter(), is_done(), and sheaf::read_write_monitor_handle::state_is_read_accessible().

◆ initialize_filter() [4/5]

void sheaf::depth_first_iterator::initialize_filter ( const scoped_index xfilter_id)
protected

Initializes the client filter to the subposet with id xfilter_id then initializes the filter from the client filter.

Precondition
  • _anchor != 0
  • _anchor->state_is_read_accessible()
  • _anchor->host()->includes_subposet(xfilter_id)
Postcondition
  • _filter != 0
  • _client_filter.index() ==~ xfilter_id

Definition at line 1839 of file depth_first_iterator.cc.

References _anchor, _client_filter, sheaf::poset_component::host(), sheaf::scoped_index::hub_pod(), sheaf::poset_state_handle::includes_subposet(), sheaf::poset_component::index(), initialize_filter(), is_done(), and sheaf::read_write_monitor_handle::state_is_read_accessible().

◆ initialize_filter() [5/5]

void sheaf::depth_first_iterator::initialize_filter ( const std::string &  xfilter_name)
protected

Initializes the client filter to the subposet with name xfilter_name then initializes the filter from the client filter.

Precondition
  • _anchor != 0
  • _anchor->state_is_read_accessible()
  • !xfilter_name.empty() ? _anchor->host()->includes_subposet(xfilter_name) : true
Postcondition
  • _filter != 0
  • !xfilter_name.empty() ? _client_filter.has_name(xfilter_name) : _client_filter.has_name(anchor().version_name())

Definition at line 1865 of file depth_first_iterator.cc.

References _anchor, _client_filter, anchor(), sheaf::poset_component::attach_to_state(), sheaf::subposet::has_name(), sheaf::poset_component::host(), sheaf::poset_state_handle::includes_subposet(), initialize_filter(), is_done(), release_cover_id_space_iterators(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::poset_component::version_name().

◆ initialize_has_visited()

void sheaf::depth_first_iterator::initialize_has_visited ( const abstract_poset_member xanchor)
protectedvirtual

◆ initialize_order()

◆ initialize_traversal() [1/3]

◆ initialize_traversal() [2/3]

void sheaf::depth_first_iterator::initialize_traversal ( pod_index_type  xanchor_hub_id)
protected

Initializes the anchor, has_visited markers and filter.

Precondition
  • anchor().host()->contains_member(xanchor_hub_id)
Postcondition
  • anchor().version() == old_anchor_version

Definition at line 1524 of file depth_first_iterator.cc.

References _anchor, _descending, _strict, anchor(), sheaf::abstract_poset_member::attach_to_state(), descending(), filter(), force_is_done(), index(), initialize_traversal(), invariant(), is_done(), is_initialized(), and strict().

◆ initialize_traversal() [3/3]

void sheaf::depth_first_iterator::initialize_traversal ( const scoped_index xanchor_id)
protected

Initializes the anchor, has_visited markers and filter.

Precondition
  • anchor().host()->contains_member(xanchor_id)
Postcondition
  • anchor().version() == old_anchor_version

Definition at line 1574 of file depth_first_iterator.cc.

References _descending, _strict, anchor(), descending(), filter(), sheaf::scoped_index::hub_pod(), index(), initialize_anchor(), initialize_traversal(), invariant(), is_done(), is_initialized(), and strict().

◆ invariant()

bool sheaf::depth_first_iterator::invariant ( ) const
virtual

The class invariant.

Invariant
Todo:
Need to replace with a condition that takes in account when the _path_head is not initialized.
Invariant
  • _new_filter ? _filter != 0 : true
  • !is_initialized() ? !_new_filter : true

Reimplemented from sheaf::any.

Reimplemented in sheaf::filtered_depth_first_iterator, tool::visualization_iterator_1_3, tool::visualization_iterator_4_3, tool::visualization_iterator_1_1, tool::visualization_iterator_4_2, tool::visualization_iterator, sheaf::triorder_iterator, sheaf::linkorder_iterator, sheaf::postorder_iterator, and sheaf::preorder_iterator.

Definition at line 119 of file depth_first_iterator.cc.

References _anchor, _new_filter, _state, action(), anchor(), sheaf::any::disable_invariant_check(), sheaf::any::enable_invariant_check(), sheaf::any::invariant(), sheaf::any::invariant_check(), is_done(), is_initialized(), NULL_FILTER, and order().

Referenced by clone(), depth_first_iterator(), first(), force_is_done(), initialize_filter(), initialize_traversal(), fiber_bundle::discretization_iterator::invariant(), fiber_bundle::eval_iterator::invariant(), sheaf::filtered_depth_first_iterator::invariant(), fields::field_eval_iterator::invariant(), operator=(), and reset().

◆ is_ancestor_of()

◆ is_done()

bool sheaf::depth_first_iterator::is_done ( ) const

True if iteration finished.

Definition at line 337 of file depth_first_iterator.cc.

References _state, and force_is_done().

Referenced by fields::base_space_map::base_space_map(), tool::vtk_unstructured_grid_builder::build_pa(), fiber_bundle::base_space_member::c_minus(), fiber_bundle::base_space_member::c_not_pa(), fiber_bundle::eval_iterator::client_id(), fields::field_eval_iterator::coordinate_discretization_members(), fields::field_eval_iterator::coordinate_evaluator(), ct(), fields::field_eval_iterator::db(), fiber_bundle::eval_iterator::db(), fiber_bundle::base_space_member::db(), depth(), depth_first_iterator(), fiber_bundle::eval_iterator::discretization_client_id(), fiber_bundle::sec_rep_space_member::discretization_ct(), fiber_bundle::discretization_iterator::discretization_iterator(), fiber_bundle::eval_iterator::discretization_members(), fields::field_eval_iterator::enough_capacity(), fiber_bundle::eval_iterator::eval_iterator(), fiber_bundle::sec_rep_space_member::evaluation_ct(), fiber_bundle::eval_iterator::evaluator(), sheaf::subposet::extremals_pa(), fields::field_eval_iterator::field_eval_iterator(), filter(), sheaf::filtered_depth_first_iterator::filtered_depth_first_iterator(), fiber_bundle::discretization_iterator::force_is_done(), fiber_bundle::eval_iterator::force_is_done(), force_is_done(), fields::field_eval_iterator::force_is_done(), fiber_bundle::eval_iterator::gather_dofs(), fiber_bundle::sparse_field_dof_map::get_component_dofs(), greater_index(), index(), initialize_anchor(), fields::field_eval_iterator::initialize_coordinate_schema(), initialize_filter(), fiber_bundle::discretization_iterator::initialize_has_visited(), initialize_has_visited(), fields::field_eval_iterator::initialize_property_schema(), fiber_bundle::discretization_iterator::initialize_schema_anchor(), fiber_bundle::eval_iterator::initialize_schema_anchor(), initialize_traversal(), invariant(), sheaf::filtered_depth_first_member_iterator::is_done(), tool::vtk_unstructured_grid_builder::is_tensor(), lesser_index(), fiber_bundle::discretization_iterator::next(), fiber_bundle::eval_iterator::next(), fields::property_disc_iterator_1_1::next(), next(), fields::field_eval_iterator::next(), operator=(), sheaf::filtered_depth_first_iterator::operator=(), fields::property_disc_iterator_1_1::property_disc_iterator_1_1(), fields::field_eval_iterator::property_discretization_members(), fields::field_eval_iterator::property_evaluator(), fields::discretization_pusher::push(), fields::refining_section_pusher::push(), sheaf::filtered_depth_first_iterator::put_anchor(), fiber_bundle::sparse_field_dof_map::put_component_dofs(), sheaf::filtered_depth_first_iterator::put_filter(), fiber_bundle::unstructured_block_builder::put_name_mode(), fields::field_vd::put_property_dofs(), fiber_bundle::discretization_iterator::put_schema_anchor(), fiber_bundle::eval_iterator::put_schema_anchor(), fields::field_refiner::refine(), fields::body_pusher::same_fiber(), fiber_bundle::eval_iterator::scatter_dofs(), fields::section_pusher::section_pusher(), fields::field_eval_iterator::type_id(), fiber_bundle::eval_iterator::type_id(), fields::field_eval_iterator::type_name(), geometry::d_bin_point_locator< DC, DB >::update(), geometry::cylindrical_point_locator::update(), geometry::db0_point_locator< DC >::update(), fields::field_eval_iterator::update_capacity(), geometry::point_locator::update_domain(), fiber_bundle::binary_section_dof_iterator::update_item(), sheaf::filtered_depth_first_member_iterator::update_item(), tool::visualization_iterator_1_1::visualization_iterator_1_1(), tool::visualization_iterator_1_3::visualization_iterator_1_3(), tool::visualization_iterator_4_2::visualization_iterator_4_2(), and tool::visualization_iterator_4_3::visualization_iterator_4_3().

◆ is_initialized()

bool sheaf::depth_first_iterator::is_initialized ( ) const
virtual

True if this has been initialized for iteration with respect to a specific anchor.

Reimplemented in fiber_bundle::eval_iterator, and fiber_bundle::discretization_iterator.

Definition at line 195 of file depth_first_iterator.cc.

References _anchor, and anchor().

Referenced by anchor(), sheaf::biorder_iterator::biorder_iterator(), sheaf::biorder_iterator::clone(), sheaf::linkorder_iterator::clone(), sheaf::postorder_iterator::clone(), sheaf::preorder_iterator::clone(), sheaf::triorder_iterator::clone(), clone(), sheaf::filtered_depth_first_iterator::clone(), fields::field_eval_iterator::coordinate_evaluator(), fields::field_eval_iterator::coordinate_schema_anchor(), ct(), depth_first_iterator(), fields::field_eval_iterator::field_eval_iterator(), filter(), sheaf::filtered_depth_first_iterator::filtered_depth_first_iterator(), first(), greater_index(), has_visited(), initialize_traversal(), sheaf::filtered_depth_first_member_iterator::invariant(), invariant(), fiber_bundle::discretization_iterator::is_initialized(), fiber_bundle::eval_iterator::is_initialized(), sheaf::filtered_depth_first_member_iterator::is_initialized(), is_maximal(), lesser_index(), sheaf::linkorder_iterator::linkorder_iterator(), mark_not_visited(), mark_visited(), next(), operator=(), sheaf::filtered_depth_first_iterator::operator=(), order(), sheaf::postorder_iterator::postorder_iterator(), sheaf::preorder_iterator::preorder_iterator(), fields::property_disc_iterator_1_1::property_disc_iterator_1_1(), fields::field_eval_iterator::property_evaluator(), fields::field_eval_iterator::property_schema_anchor(), sheaf::filtered_depth_first_iterator::put_anchor(), sheaf::filtered_depth_first_iterator::put_filter(), put_has_visited(), reset(), sheaf::triorder_iterator::triorder_iterator(), tool::visualization_iterator_1_1::visualization_iterator_1_1(), tool::visualization_iterator_1_3::visualization_iterator_1_3(), tool::visualization_iterator_4_2::visualization_iterator_4_2(), and tool::visualization_iterator_4_3::visualization_iterator_4_3().

◆ is_maximal()

bool sheaf::depth_first_iterator::is_maximal ( ) const

True if the current member has no greater member within the subposet visited by this iterator.

Precondition
Postcondition

Definition at line 1015 of file depth_first_iterator.cc.

References greater_index(), is_initialized(), sheaf::is_valid(), and sheaf::scoped_index::is_valid().

Referenced by put_visit_once().

◆ lesser_index()

const sheaf::scoped_index & sheaf::depth_first_iterator::lesser_index ( ) const

The index of the lesser member of the current link.

Precondition
  • !is_done()
Issue:
the preconditions above ensure that the dereference of _path_head_lc in the following will succeed, as long as this routine is called from client level. If called internally from the INC_COVER_ITERATOR state, the dereference could fail. Such a call is inappropriate, but how do we express this fact as a precondition?

Definition at line 1060 of file depth_first_iterator.cc.

References _action, _index, _lesser_index, _path_head_lc, action(), sheaf::index_space_iterator::hub_pod(), is_done(), is_initialized(), and sheaf::scoped_index::pod().

Referenced by greater_index(), index(), sheaf::filtered_depth_first_member_iterator::lesser_index(), and fiber_bundle::unstructured_block_builder::put_name_mode().

◆ mark_not_visited()

void sheaf::depth_first_iterator::mark_not_visited ( abstract_poset_member xmbr)
protected

Mark xmbr as not visited. Warning: this function can change the state of the iteration in unpredictable ways. Use only if you know what you are doing.

Precondition
  • xmbr != 0
  • xmbr->is_attached()
  • anchor().host()->contains_member(xmbr)
Postcondition
  • !has_visited(xmbr)

Definition at line 1392 of file depth_first_iterator.cc.

References anchor(), attach_item(), has_visited(), sheaf::poset_component::index(), sheaf::poset_component::is_attached(), is_initialized(), and put_has_visited().

Referenced by mark_visited().

◆ mark_visited()

void sheaf::depth_first_iterator::mark_visited ( abstract_poset_member xmbr)
protected

Mark xmbr as visited. Warning: this function can change the state of the iteration in unpredictable ways. Use only if you know what you are doing.

Precondition
  • anchor().state_is_read_write_accessible()
  • xmbr != 0
  • xmbr->is_attached()
  • anchor().host()->contains_member(xmbr)
Postcondition
  • has_visited(xmbr)

Definition at line 1366 of file depth_first_iterator.cc.

References anchor(), has_visited(), sheaf::poset_component::index(), sheaf::poset_component::is_attached(), is_initialized(), mark_not_visited(), and put_has_visited().

Referenced by first().

◆ next() [1/2]

◆ next() [2/2]

void sheaf::depth_first_iterator::next ( bool  xtruncate)
virtual

Makes this the next member of the subset. If action() == PREVISIT_ACTION and xtruncate, new this is not less than old this, i.e. the depth-first descent is truncated and the cover of this is not visited. If action() != PREVISIT_ACTION, xtruncate is ignored.

Precondition
  • !is_done()
Todo:
elaborate the number of states and the state transition functions so that the tests on _descending and _strict are removed from the iteration. For instance there should be separate EXECUTE_PREVISIT_ACTION and EXECUTE_STRICT_PREVISIT_ACTION states and transition functions. The EXECUTE_PREVISIT_ACTION would not test _strict or _index. The non-strict transistion function would use EXECUTE_PREVISIT_ACTION while the strict trnaisition function would use EXECUTE_STRICT_PREVISIT_ACTION.
Todo:
can remove test for strictness from the iteration when _strict is false by implementing a separate state execute_strict_previsit_action, then defining two different transition functions, one for strict, one for not strict. Then proper transition function is installed by reset.
Todo:
see todo at execute_previsit_action.
Issue:
Here and beyond is unreachable; remaining code commented out to avoid compiler warnings.

Reimplemented in fields::field_eval_iterator, fields::property_disc_iterator_1_3, fields::property_disc_iterator_1_2, fields::property_disc_iterator_4_3, fields::property_disc_iterator_4_2, fields::property_disc_iterator_1_1, fiber_bundle::eval_iterator, fiber_bundle::discretization_iterator, tool::visualization_iterator_1_3, tool::visualization_iterator_4_3, tool::visualization_iterator_1_1, and tool::visualization_iterator_4_2.

Definition at line 387 of file depth_first_iterator.cc.

References _action, _anchor, _descending, _filtered_path_tail, _index, _path_head, _path_head_lc, _path_tail, _state, _strict, _transition_fcn, _visit_once, attach_item(), sheaf::poset_state_handle::clear_cover(), detach_item(), filter(), sheaf::index_space_iterator::force_is_done(), sheaf::poset_state_handle::get_cover_id_space_iterator(), has_visited(), sheaf::poset_component::host(), sheaf::index_space_iterator::hub_pod(), sheaf::poset_component::index(), sheaf::scoped_index::invalidate(), sheaf::index_space_iterator::is_done(), is_done(), is_initialized(), iterator_state_names, sheaf::index_space_iterator::next(), sheaf::scoped_index::pod(), put_has_visited(), sheaf::poset_state_handle::release_cover_id_space_iterator(), and reset().

◆ operator=()

sheaf::depth_first_iterator & sheaf::depth_first_iterator::operator= ( const depth_first_iterator xother)

Assignment operator.

Postcondition

Definition at line 1252 of file depth_first_iterator.cc.

References _anchor, _client_filter, _descending, _new_filter, _order, _strict, _visit_once, anchor(), descending(), sheaf::poset_component::detach_from_state(), filter(), first(), force_is_done(), sheaf::poset_component::index(), initialize_filter(), initialize_order(), initialize_traversal(), invariant(), is_done(), is_initialized(), order(), strict(), sheaf::poset_component::version(), sheaf::poset_component::version_index(), and visit_once().

Referenced by depth_first_iterator(), and sheaf::filtered_depth_first_iterator::operator=().

◆ order()

◆ put_has_visited() [1/3]

void sheaf::depth_first_iterator::put_has_visited ( pod_index_type  xhub_id,
bool  xvalue 
)

Set the visited marker for hub id xhub_id to xvalue. Intended for use reseting iterator without having to reset entire collection of markers.

Precondition
  • anchor().host()->contains_member(xhub_id)
Postcondition
  • has_visited(xhub_id) == xvalue

Definition at line 945 of file depth_first_iterator.cc.

References anchor(), has_visited(), is_initialized(), and sheaf::zn_to_bool::put().

Referenced by first(), has_visited(), mark_not_visited(), mark_visited(), fiber_bundle::discretization_iterator::next(), fiber_bundle::eval_iterator::next(), next(), fields::field_eval_iterator::next(), sheaf::filtered_depth_first_member_iterator::put_has_visited(), and fiber_bundle::discretization_iterator::~discretization_iterator().

◆ put_has_visited() [2/3]

void sheaf::depth_first_iterator::put_has_visited ( const scoped_index xid,
bool  xvalue 
)

Set the visisted marker for id xid to xvalue. Intended for use reseting iterator without having to reset entire collection of markers.

Precondition
Postcondition
  • has_visited(xid) == xvalue

Definition at line 967 of file depth_first_iterator.cc.

References anchor(), has_visited(), sheaf::scoped_index::hub_pod(), is_initialized(), sheaf::zn_to_bool::put(), and visit_once().

◆ put_has_visited() [3/3]

void sheaf::depth_first_iterator::put_has_visited ( zn_to_bool xhas_visited)
protected

Sets _has_visited to xhas_visited. /.

Hack:
temporary support for obsolete "multivalued" / feature of discretization_iterator; will be removed when / discretization_iterator updated. /

Definition at line 1696 of file depth_first_iterator.cc.

References initialize_filter().

◆ put_visit_once()

void sheaf::depth_first_iterator::put_visit_once ( bool  xvisit_once)

Set visit_once() to xvisit_once.

Postcondition

Definition at line 996 of file depth_first_iterator.cc.

References _visit_once, is_maximal(), and visit_once().

Referenced by fiber_bundle::base_space_member::c_minus(), fiber_bundle::eval_iterator::eval_iterator(), and visit_once().

◆ release_cover_id_space_iterators()

void sheaf::depth_first_iterator::release_cover_id_space_iterators ( )
protected

◆ reset()

void sheaf::depth_first_iterator::reset ( bool  xreset_markers = true)
virtual

Restarts the iteration over the down set of anchor().

Precondition
Todo:
replace with clear_has_visited
Postcondition
Todo:
add postconditions describing the effect of reset_markers, descending, and strict. Also add a postcondtion that state is_done or is first member of iteration. The following might be useful: ensure(strict() && !is_done() ? index() != anchor().index() : true); ensure(strict() ? !has_visited(&(anchor())): true );

Reimplemented in fields::field_eval_iterator, fields::property_disc_iterator_1_2, fields::property_disc_iterator_4_2, and tool::visualization_iterator.

Definition at line 806 of file depth_first_iterator.cc.

References _anchor, _descending, _strict, anchor(), ct(), descending(), sheaf::zn_to_bool::extend_to(), first(), force_is_done(), sheaf::poset_component::host(), invariant(), is_initialized(), sheaf::zn_to_bool::make_false_sa(), sheaf::poset_state_handle::member_index_ub(), sheaf::scoped_index::pod(), and strict().

Referenced by fiber_bundle::base_space_member::c_minus(), ct(), depth_first_iterator(), fiber_bundle::discretization_iterator::discretization_iterator(), fiber_bundle::eval_iterator::eval_iterator(), sheaf::subposet::extremals_pa(), sheaf::filtered_depth_first_iterator::filtered_depth_first_iterator(), next(), fiber_bundle::unstructured_block_builder::put_name_mode(), tool::visualization_iterator::reset(), sheaf::filtered_depth_first_member_iterator::reset(), fields::field_eval_iterator::reset(), fiber_bundle::section_eval_iterator::reset_components(), geometry::d_bin_point_locator< DC, DB >::update(), and geometry::cylindrical_point_locator::update().

◆ strict()

◆ truncate()

◆ visit_once()

bool sheaf::depth_first_iterator::visit_once ( ) const

True if traversal should only visit a member once; that is, it should not revisit members it has already visited.

Definition at line 989 of file depth_first_iterator.cc.

References _visit_once, and put_visit_once().

Referenced by depth_first_iterator(), fiber_bundle::eval_iterator::eval_iterator(), sheaf::filtered_depth_first_iterator::filtered_depth_first_iterator(), operator=(), sheaf::filtered_depth_first_iterator::operator=(), put_has_visited(), and put_visit_once().

Member Data Documentation

◆ _action

action_type sheaf::depth_first_iterator::_action
protected

The type of action the client should take; the state of the iterator.

Definition at line 510 of file depth_first_iterator.h.

Referenced by action(), depth_first_iterator(), force_is_done(), greater_index(), lesser_index(), and next().

◆ _anchor

◆ _client_filter

subposet sheaf::depth_first_iterator::_client_filter
protected

◆ _descending

◆ _filtered_path_tail

std::stack<pod_index_type> sheaf::depth_first_iterator::_filtered_path_tail
protected

The tail of the filtered path to the current member of the iteration. Contains only members which pass the filter; equivalent to the path in the subposet selected by the filter.

Definition at line 663 of file depth_first_iterator.h.

Referenced by force_is_done(), greater_index(), and next().

◆ _greater_index

scoped_index sheaf::depth_first_iterator::_greater_index
mutableprotected

The index of the greater member of the current link.

Definition at line 521 of file depth_first_iterator.h.

Referenced by greater_index(), and initialize_anchor().

◆ _index

scoped_index sheaf::depth_first_iterator::_index
protected

The index of the lesser end of the current link; the current item in the iteration.

Definition at line 516 of file depth_first_iterator.h.

Referenced by depth_first_iterator(), first(), force_is_done(), greater_index(), index(), initialize_anchor(), lesser_index(), fiber_bundle::discretization_iterator::next(), fields::property_disc_iterator_1_1::next(), and next().

◆ _lesser_index

scoped_index sheaf::depth_first_iterator::_lesser_index
mutableprotected

The index of the lesser member of the current link.

Definition at line 526 of file depth_first_iterator.h.

Referenced by initialize_anchor(), and lesser_index().

◆ _new_filter

bool sheaf::depth_first_iterator::_new_filter
protected

◆ _order

order_type sheaf::depth_first_iterator::_order
protected

The order of the iteration.

Definition at line 551 of file depth_first_iterator.h.

Referenced by initialize_order(), operator=(), and order().

◆ _path_head

index_space_iterator* sheaf::depth_first_iterator::_path_head
protected

The head of the path to the current member of the iteration lesser_index() == this->index() == **_path_head == lesser member of current link.

Definition at line 650 of file depth_first_iterator.h.

Referenced by depth_first_iterator(), next(), and release_cover_id_space_iterators().

◆ _path_head_lc

index_space_iterator* sheaf::depth_first_iterator::_path_head_lc
protected

The lower cover iterator for the head of the path to the current member of the iteration.

Definition at line 644 of file depth_first_iterator.h.

Referenced by depth_first_iterator(), lesser_index(), next(), and release_cover_id_space_iterators().

◆ _path_tail

std::stack<index_space_iterator*> sheaf::depth_first_iterator::_path_tail
protected

The tail of the path to the current member of the iteration greater_index() == **(_path_tail.top()) == greater member of current link.

Definition at line 656 of file depth_first_iterator.h.

Referenced by depth(), first(), next(), and release_cover_id_space_iterators().

◆ _state

iterator_state sheaf::depth_first_iterator::_state
protected

The current state of iteration.

Definition at line 638 of file depth_first_iterator.h.

Referenced by depth_first_iterator(), erase_cover(), first(), force_is_done(), invariant(), is_done(), next(), and fields::field_eval_iterator::repeat().

◆ _strict

◆ _transition_fcn

const iterator_state(* sheaf::depth_first_iterator::_transition_fcn)[FAIL+1]
protected

The current state transition function for the iterator finite state machine. Points to one of the predefined transition functions.

Definition at line 591 of file depth_first_iterator.h.

Referenced by first(), initialize_order(), and next().

◆ _visit_once

bool sheaf::depth_first_iterator::_visit_once
protected

True if traversal should only visit a member once; that is, it should not revisit members it has already visited.

Definition at line 669 of file depth_first_iterator.h.

Referenced by depth_first_iterator(), next(), operator=(), put_visit_once(), and visit_once().

◆ BIORDER_TRANSITION_FCN

const sheaf::depth_first_iterator::iterator_state sheaf::depth_first_iterator::BIORDER_TRANSITION_FCN
staticprotected
Initial value:
=
{
EXECUTE_PREVISIT_ACTION, EXECUTE_PREVISIT_ACTION,
TEST_HAS_VISITED, EXECUTE_POSTVISIT_ACTION,
INC_COVER_ITERATOR, DESCEND,
TEST_HAS_VISITED, EXECUTE_POSTVISIT_ACTION,
NOT_A_STATE, NOT_A_STATE,
EXECUTE_PREVISIT_ACTION, EXECUTE_PREVISIT_ACTION,
FINISH, ASCEND,
INC_COVER_ITERATOR, INC_COVER_ITERATOR,
INIT_COVER_ITERATOR, INIT_COVER_ITERATOR,
NOT_A_STATE, NOT_A_STATE,
TEST_PATH_TAIL, TEST_PATH_TAIL
}

The predefined transition function for biorder iteration. Defines the next state for each combination of state and input token, except for state FINISH, which is always a terminal state.

Definition at line 619 of file depth_first_iterator.h.

Referenced by release_cover_id_space_iterators().

◆ iterator_state_names

const char * sheaf::depth_first_iterator::iterator_state_names
staticprotected
Initial value:
=
{
"FIRST",
"INIT_COVER_ITERATOR",
"TEST_HAS_VISITED",
"INC_COVER_ITERATOR",
"ERASE_COVER_ITERATOR",
"DESCEND",
"TEST_PATH_TAIL",
"ASCEND",
"EXECUTE_PREVISIT_ACTION",
"EXECUTE_LINK_ACTION",
"EXECUTE_POSTVISIT_ACTION",
"FINISH",
"NOT_A_STATE"
}

The names of the iterator states, convenient for debugging.

Definition at line 585 of file depth_first_iterator.h.

Referenced by next(), and release_cover_id_space_iterators().

◆ LINKORDER_TRANSITION_FCN

const sheaf::depth_first_iterator::iterator_state sheaf::depth_first_iterator::LINKORDER_TRANSITION_FCN
staticprotected
Initial value:
=
{
INIT_COVER_ITERATOR, INIT_COVER_ITERATOR,
TEST_HAS_VISITED, TEST_PATH_TAIL,
EXECUTE_LINK_ACTION, DESCEND,
TEST_HAS_VISITED, TEST_PATH_TAIL,
TEST_HAS_VISITED, TEST_PATH_TAIL,
INIT_COVER_ITERATOR, INIT_COVER_ITERATOR,
FINISH, ASCEND,
EXECUTE_LINK_ACTION, EXECUTE_LINK_ACTION,
NOT_A_STATE, NOT_A_STATE,
INC_COVER_ITERATOR, INC_COVER_ITERATOR,
NOT_A_STATE, NOT_A_STATE
}

The predefined transition function for linkorder iteration. Defines the next state for each combination of state and input token, except for state FINISH, which is always a terminal state.

Definition at line 612 of file depth_first_iterator.h.

Referenced by release_cover_id_space_iterators().

◆ NULL_FILTER

const char * sheaf::depth_first_iterator::NULL_FILTER = ""
static

Placeholder for null filter.

Definition at line 117 of file depth_first_iterator.h.

Referenced by invariant().

◆ POSTORDER_TRANSITION_FCN

const sheaf::depth_first_iterator::iterator_state sheaf::depth_first_iterator::POSTORDER_TRANSITION_FCN
staticprotected
Initial value:
=
{
INIT_COVER_ITERATOR, INIT_COVER_ITERATOR,
TEST_HAS_VISITED, EXECUTE_POSTVISIT_ACTION,
INC_COVER_ITERATOR, DESCEND,
TEST_HAS_VISITED, EXECUTE_POSTVISIT_ACTION,
NOT_A_STATE, NOT_A_STATE,
INIT_COVER_ITERATOR, INIT_COVER_ITERATOR,
FINISH, ASCEND,
INC_COVER_ITERATOR, INC_COVER_ITERATOR,
NOT_A_STATE, NOT_A_STATE,
NOT_A_STATE, NOT_A_STATE,
TEST_PATH_TAIL, TEST_PATH_TAIL
}

The predefined transition function for postorder iteration. Defines the next state for each combination of state and input token, except for state FINISH, which is always a terminal state.

Definition at line 605 of file depth_first_iterator.h.

Referenced by release_cover_id_space_iterators().

◆ PREORDER_TRANSITION_FCN

const sheaf::depth_first_iterator::iterator_state sheaf::depth_first_iterator::PREORDER_TRANSITION_FCN
staticprotected
Initial value:
=
{
EXECUTE_PREVISIT_ACTION, EXECUTE_PREVISIT_ACTION,
TEST_HAS_VISITED, TEST_PATH_TAIL,
INC_COVER_ITERATOR, DESCEND,
TEST_HAS_VISITED, TEST_PATH_TAIL,
NOT_A_STATE, NOT_A_STATE,
EXECUTE_PREVISIT_ACTION, EXECUTE_PREVISIT_ACTION,
FINISH, ASCEND,
INC_COVER_ITERATOR, INC_COVER_ITERATOR,
INIT_COVER_ITERATOR, INIT_COVER_ITERATOR,
NOT_A_STATE, NOT_A_STATE,
NOT_A_STATE, NOT_A_STATE
}

The predefined transition function for postorder iteration. Defines the next state for each combination of state and input token, except for state FINISH, which is always a terminal state.

Definition at line 598 of file depth_first_iterator.h.

Referenced by release_cover_id_space_iterators().

◆ STD_TRANSITION_FCNS

const sheaf::depth_first_iterator::transition_fcn_type sheaf::depth_first_iterator::STD_TRANSITION_FCNS
staticprotected
Initial value:

The set of predefined transition functions.

Definition at line 633 of file depth_first_iterator.h.

Referenced by initialize_order(), and release_cover_id_space_iterators().

◆ TRIORDER_TRANSITION_FCN

const sheaf::depth_first_iterator::iterator_state sheaf::depth_first_iterator::TRIORDER_TRANSITION_FCN
staticprotected
Initial value:
=
{
EXECUTE_PREVISIT_ACTION, EXECUTE_PREVISIT_ACTION,
TEST_HAS_VISITED, EXECUTE_POSTVISIT_ACTION,
EXECUTE_LINK_ACTION, DESCEND,
TEST_HAS_VISITED, EXECUTE_POSTVISIT_ACTION,
TEST_HAS_VISITED, EXECUTE_POSTVISIT_ACTION,
EXECUTE_PREVISIT_ACTION, EXECUTE_PREVISIT_ACTION,
FINISH, ASCEND,
EXECUTE_LINK_ACTION, EXECUTE_LINK_ACTION,
INIT_COVER_ITERATOR, INIT_COVER_ITERATOR,
INC_COVER_ITERATOR, INC_COVER_ITERATOR,
TEST_PATH_TAIL, TEST_PATH_TAIL
}

The predefined transition function for triorder iteration. Defines the next state for each combination of state and input token, except for state FINISH, which is always a terminal state.

Definition at line 626 of file depth_first_iterator.h.

Referenced by release_cover_id_space_iterators().


The documentation for this class was generated from the following files: