SheafSystem  0.0.0.0
sheaf::depth_first_itr< T > Class Template Reference

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. More...

#include <depth_first_itr.h>

Inheritance diagram for sheaf::depth_first_itr< T >:
sheaf::any sheaf::filtered_depth_first_itr< T > sheaf::biorder_itr< T > sheaf::linkorder_itr< T > sheaf::postorder_itr< T > sheaf::preorder_itr< T > sheaf::triorder_itr< T >

Public Member Functions

template<>
void clear_has_visited ()
 
template<>
void reserve_has_visited (pod_index_type xub)
 
template<>
bool has_visited (pod_index_type xindex) const
 
template<>
void put_has_visited (pod_index_type xindex, bool xvalue)
 
template<>
void clear_has_visited ()
 
template<>
void reserve_has_visited (sheaf::pod_index_type xub)
 
template<>
bool has_visited (pod_index_type xindex) const
 
template<>
void put_has_visited (pod_index_type xindex, bool xvalue)
 
template<>
void clear_has_visited ()
 
template<>
void reserve_has_visited (pod_index_type xub)
 
template<>
bool has_visited (pod_index_type xindex) const
 
template<>
void put_has_visited (pod_index_type xindex, bool xvalue)
 
template<>
SHEAF_DLL_SPEC void clear_has_visited ()
 
template<>
SHEAF_DLL_SPEC void reserve_has_visited (pod_index_type xub)
 
template<>
SHEAF_DLL_SPEC bool has_visited (pod_index_type xhub_id) const
 
template<>
SHEAF_DLL_SPEC void put_has_visited (pod_index_type xhub_id, bool xvalue)
 
template<>
SHEAF_DLL_SPEC void clear_has_visited ()
 
template<>
SHEAF_DLL_SPEC void reserve_has_visited (pod_index_type xub)
 
template<>
SHEAF_DLL_SPEC bool has_visited (pod_index_type xhub_id) const
 
template<>
SHEAF_DLL_SPEC void put_has_visited (pod_index_type xhub_id, bool xvalue)
 
template<>
SHEAF_DLL_SPEC void clear_has_visited ()
 
template<>
SHEAF_DLL_SPEC void reserve_has_visited (pod_index_type xub)
 
template<>
SHEAF_DLL_SPEC bool has_visited (pod_index_type xhub_id) const
 
template<>
SHEAF_DLL_SPEC void put_has_visited (pod_index_type xhub_id, bool xvalue)
 
- 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...
 

Protected Member Functions

template<>
void initialize_has_visited (const abstract_poset_member &xanchor)
 
template<>
void initialize_has_visited (const abstract_poset_member &xanchor)
 
template<>
void initialize_has_visited (const abstract_poset_member &xanchor)
 
template<>
SHEAF_DLL_SPEC void initialize_has_visited (const abstract_poset_member &xanchor)
 
template<>
SHEAF_DLL_SPEC void initialize_has_visited (const abstract_poset_member &xanchor)
 
template<>
SHEAF_DLL_SPEC void initialize_has_visited (const abstract_poset_member &xanchor)
 
- Protected Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 

DEPTH_FIRST_ITR FACET

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...
 
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...
 
static const char * NULL_FILTER = ""
 Placeholder for null filter. More...
 
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 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...
 
depth_first_itroperator= (const depth_first_itr &xother)
 Assignment operator. More...
 
virtual ~depth_first_itr ()
 Destructor. More...
 
 depth_first_itr ()
 Default constructor; creates an unattached iterator,. More...
 
 depth_first_itr (const depth_first_itr &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...
 
bool filter (pod_index_type xhub_id)
 The value of the filter at hub id xhub_id. More...
 
bool filter (const scoped_index &xid)
 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...
 

ITERATOR FACET

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. More...
 
virtual const abstract_poset_memberanchor () const
 The poset member whose downset is being iterated over; the top member of the domain of iteration. 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...
 
void clear_has_visited ()
 Makes has_visited(i) false for all i. More...
 
void reserve_has_visited (pod_index_type xub)
 Ensures has_visited(i) is a legal call for 0 <= i < xub. 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 ()
 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...
 

INDEX ITERATOR FACET

const scoped_indexindex () const
 The index of the current member of the iteration. More...
 
size_t depth ()
 The length of the path from anchor() to the current member. More...
 

ANY FACET

virtual bool is_ancestor_of (const any *other) const
 True if other conforms to this. More...
 
virtual depth_first_itrclone () const
 Make a new instance of the same type as this. More...
 
bool invariant () const
 The class invariant. More...
 

Detailed Description

template<typename T>
class sheaf::depth_first_itr< T >

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.

Hack:
Included set and unordered_set as a workaround until we know how to get forward declarations for same.

Definition at line 90 of file depth_first_itr.h.

Member Enumeration Documentation

◆ action_type

template<typename T>
enum sheaf::depth_first_itr::action_type

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

Definition at line 135 of file depth_first_itr.h.

◆ iterator_state

template<typename T>
enum sheaf::depth_first_itr::iterator_state
protected

The states for the finite state machine that controls iteration.

Definition at line 323 of file depth_first_itr.h.

◆ iterator_token

template<typename T>
enum sheaf::depth_first_itr::iterator_token
protected

The input tokens for the finite state machine.

Definition at line 343 of file depth_first_itr.h.

◆ order_type

template<typename T>
enum sheaf::depth_first_itr::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 121 of file depth_first_itr.h.

Constructor & Destructor Documentation

◆ ~depth_first_itr()

template<typename T >
sheaf::depth_first_itr< T >::~depth_first_itr ( )
virtual

Destructor.

Definition at line 54 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::depth_first_itr().

◆ depth_first_itr() [1/2]

template<typename T >
sheaf::depth_first_itr< T >::depth_first_itr ( )
protected

Default constructor; creates an unattached iterator,.

Postcondition
  • !is_initialized()
  • !strict()

Definition at line 99 of file depth_first_itr.impl.h.

Referenced by sheaf::depth_first_itr< T >::~depth_first_itr().

◆ depth_first_itr() [2/2]

template<typename T >
sheaf::depth_first_itr< T >::depth_first_itr ( const depth_first_itr< T > &  xother)
protected

Copy constructor.

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

Definition at line 141 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::anchor(), sheaf::depth_first_itr< T >::descending(), sheaf::depth_first_itr< T >::is_initialized(), sheaf::NO_RESET, sheaf::depth_first_itr< T >::operator=(), sheaf::depth_first_itr< T >::order(), sheaf::depth_first_itr< T >::strict(), sheaf::poset_component::version(), and sheaf::depth_first_itr< T >::visit_once().

Member Function Documentation

◆ action()

template<typename T >
depth_first_itr< T >::action_type sheaf::depth_first_itr< T >::action ( ) const

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

Definition at line 2042 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::erase_cover().

Referenced by sheaf::depth_first_itr< T >::lesser_index().

◆ anchor() [1/2]

◆ anchor() [2/2]

template<typename T >
const abstract_poset_member & sheaf::depth_first_itr< T >::anchor ( ) const
virtual

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

Precondition

Definition at line 1133 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::anchor_is_ancestor_of().

◆ anchor_is_ancestor_of()

template<typename T >
bool sheaf::depth_first_itr< T >::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 1153 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::descending().

Referenced by sheaf::depth_first_itr< T >::anchor(), and sheaf::filtered_depth_first_itr< T >::put_anchor().

◆ attach_item()

template<typename T >
void sheaf::depth_first_itr< T >::attach_item ( )
protectedvirtual

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

Definition at line 393 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::detach_item().

Referenced by sheaf::depth_first_itr< T >::mark_not_visited().

◆ clear_has_visited()

template<typename T >
void sheaf::depth_first_itr< T >::clear_has_visited ( )

Makes has_visited(i) false for all i.

Is Abstract.

Definition at line 1796 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::reserve_has_visited().

Referenced by sheaf::depth_first_itr< T >::ct().

◆ clone()

template<typename T >
depth_first_itr< T > * sheaf::depth_first_itr< T >::clone ( ) const
virtual

◆ ct()

template<typename T >
int sheaf::depth_first_itr< T >::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 1763 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::clear_has_visited().

Referenced by sheaf::abstract_poset_member::jim_ct(), and sheaf::depth_first_itr< T >::reset().

◆ depth()

template<typename T >
size_t sheaf::depth_first_itr< T >::depth ( )

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

Precondition
  • !is_done()

Definition at line 2115 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::is_ancestor_of().

Referenced by sheaf::depth_first_itr< T >::index().

◆ descending()

◆ detach_item()

template<typename T >
void sheaf::depth_first_itr< T >::detach_item ( )
protectedvirtual

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

Definition at line 411 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::initialize_order().

Referenced by sheaf::depth_first_itr< T >::attach_item().

◆ erase_cover()

template<typename T >
void sheaf::depth_first_itr< T >::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 2062 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::index().

Referenced by sheaf::depth_first_itr< T >::action().

◆ filter() [1/3]

template<typename T>
bool sheaf::depth_first_itr< T >::filter ( pod_index_type  xhub_id)
inlineprotected

The value of the filter at hub id xhub_id.

Definition at line 221 of file depth_first_itr.h.

Referenced by sheaf::depth_first_itr< T >::operator=().

◆ filter() [2/3]

template<typename T>
bool sheaf::depth_first_itr< T >::filter ( const scoped_index xid)
inlineprotected

The value of the filter at id xid.

Definition at line 229 of file depth_first_itr.h.

References sheaf::scoped_index::hub_pod().

◆ filter() [3/3]

◆ first()

template<typename T >
void sheaf::depth_first_itr< T >::first ( )
protected

◆ force_is_done()

template<typename T >
void sheaf::depth_first_itr< T >::force_is_done ( )
virtual

◆ greater_index()

template<typename T >
const scoped_index & sheaf::depth_first_itr< T >::greater_index ( ) const

The index of the greater member of the current link.

Precondition
  • !is_done()

Definition at line 1991 of file depth_first_itr.impl.h.

References sheaf::invalid_pod_index(), and sheaf::depth_first_itr< T >::lesser_index().

Referenced by sheaf::depth_first_itr< T >::is_maximal().

◆ has_visited() [1/6]

template<>
bool sheaf::depth_first_itr< sheaf::zn_to_bool >::has_visited ( pod_index_type  xindex) const
Precondition
  • anchor().host()->contains_member(xindex, true)

Definition at line 57 of file depth_first_itr.cc.

References sheaf::depth_first_itr< T >::initialize_has_visited().

◆ has_visited() [2/6]

template<>
bool sheaf::depth_first_itr< std::set< sheaf::pod_index_type > >::has_visited ( pod_index_type  xindex) const
Precondition
  • anchor().host()->contains_member(xindex)

Definition at line 148 of file depth_first_itr.cc.

◆ has_visited() [3/6]

template<>
bool sheaf::depth_first_itr< unordered::unordered_set< sheaf::pod_index_type > >::has_visited ( pod_index_type  xindex) const
Precondition
  • anchor().host()->contains_member(xindex)

Definition at line 251 of file depth_first_itr.cc.

◆ has_visited() [4/6]

template<typename T >
bool sheaf::depth_first_itr< T >::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)
Is Abstract.

Definition at line 1833 of file depth_first_itr.impl.h.

Referenced by sheaf::depth_first_itr< T >::has_visited(), and sheaf::depth_first_itr< T >::reserve_has_visited().

◆ has_visited() [5/6]

template<typename T >
bool sheaf::depth_first_itr< T >::has_visited ( const scoped_index xid) const

True if this has already visited member with id xid.

Precondition

Definition at line 1857 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::has_visited(), and sheaf::scoped_index::hub_pod().

◆ has_visited() [6/6]

template<typename T >
bool sheaf::depth_first_itr< T >::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 1873 of file depth_first_itr.impl.h.

References sheaf::poset_component::host(), sheaf::scoped_index::hub_pod(), sheaf::poset_component::index(), sheaf::poset_component::is_attached(), and sheaf::depth_first_itr< T >::put_has_visited().

◆ index()

◆ initialize_anchor()

template<typename T >
void sheaf::depth_first_itr< T >::initialize_anchor ( const abstract_poset_member xanchor)
protected

Initializes the anchor.

Precondition
  • anchor_is_ancestor_of(xanchor)
  • xanchor.state_is_read_accessible()
Postcondition
  • _anchor != 0
  • _anchor->is_same_state(&xanchor)
  • _anchor->is_same_type(&xanchor)

Definition at line 612 of file depth_first_itr.impl.h.

References sheaf::abstract_poset_member::attach_to_state(), sheaf::abstract_poset_member::clone(), sheaf::depth_first_itr< T >::initialize_has_visited(), and sheaf::read_write_monitor_handle::state_is_read_accessible().

Referenced by sheaf::depth_first_itr< T >::initialize_traversal().

◆ initialize_filter() [1/5]

template<typename T >
void sheaf::depth_first_itr< T >::initialize_filter ( )
protected

Initializes the filter subposet from the client filter.

Precondition
  • _anchor != 0
  • _anchor->state_is_read_accessible()
  • _client_filter.is_attached()
Postcondition
  • _filter != 0

Definition at line 685 of file depth_first_itr.impl.h.

References sheaf::poset_state_handle::host(), sheaf::poset_powerset_state::member(), sheaf::subposet_state::members(), sheaf::poset_state_handle::powerset(), and sheaf::poset_state_handle::version_index().

Referenced by sheaf::depth_first_itr< T >::initialize_filter(), sheaf::depth_first_itr< T >::initialize_has_visited(), and sheaf::filtered_depth_first_itr< T >::put_filter().

◆ initialize_filter() [2/5]

template<typename T >
void sheaf::depth_first_itr< T >::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 758 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::initialize_filter().

◆ initialize_filter() [3/5]

template<typename T >
void sheaf::depth_first_itr< T >::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 794 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::initialize_filter().

◆ initialize_filter() [4/5]

template<typename T >
void sheaf::depth_first_itr< T >::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 823 of file depth_first_itr.impl.h.

References sheaf::scoped_index::hub_pod(), and sheaf::depth_first_itr< T >::initialize_filter().

◆ initialize_filter() [5/5]

template<typename T >
void sheaf::depth_first_itr< T >::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.name() == xfilter_name : _client_filter.name() == anchor().version_name()

Definition at line 850 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::release_cover_id_space_iterators().

◆ initialize_has_visited() [1/4]

template<>
void sheaf::depth_first_itr< sheaf::zn_to_bool >::initialize_has_visited ( const abstract_poset_member xanchor)
protected

◆ initialize_has_visited() [2/4]

template<>
void sheaf::depth_first_itr< std::set< sheaf::pod_index_type > >::initialize_has_visited ( const abstract_poset_member xanchor)
protected
Precondition
  • xanchor.state_is_read_accessible()
Postcondition
  • _has_visited != 0

Definition at line 168 of file depth_first_itr.cc.

References sheaf::read_write_monitor_handle::state_is_read_accessible().

◆ initialize_has_visited() [3/4]

template<typename T >
void sheaf::depth_first_itr< T >::initialize_has_visited ( const abstract_poset_member xanchor)
protectedvirtual

Initializes the has_visited markers.

Precondition
  • xanchor.state_is_read_accessible()
Is Abstract.
Postcondition
  • _has_visited != 0

Definition at line 660 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::initialize_filter(), and sheaf::read_write_monitor_handle::state_is_read_accessible().

Referenced by sheaf::depth_first_itr< T >::has_visited(), and sheaf::depth_first_itr< T >::initialize_anchor().

◆ initialize_has_visited() [4/4]

template<>
void sheaf::depth_first_itr< unordered::unordered_set< sheaf::pod_index_type > >::initialize_has_visited ( const abstract_poset_member xanchor)
protected
Precondition
  • xanchor.state_is_read_accessible()
Postcondition
  • _has_visited != 0

Definition at line 272 of file depth_first_itr.cc.

References sheaf::read_write_monitor_handle::state_is_read_accessible().

◆ initialize_order()

◆ initialize_traversal() [1/3]

template<typename T >
void sheaf::depth_first_itr< T >::initialize_traversal ( const abstract_poset_member xanchor)
protected

Initializes the anchor, has_visited markers and filter.

Precondition
  • anchor_is_ancestor_of(xanchor)
  • xanchor.state_is_read_accessible()
Postcondition
  • anchor().version() == xanchor.version()

Definition at line 471 of file depth_first_itr.impl.h.

References sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::poset_component::version().

Referenced by sheaf::depth_first_itr< T >::initialize_order(), sheaf::depth_first_itr< T >::initialize_traversal(), and sheaf::filtered_depth_first_itr< T >::put_anchor().

◆ initialize_traversal() [2/3]

template<typename T >
void sheaf::depth_first_itr< T >::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 524 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::initialize_traversal().

◆ initialize_traversal() [3/3]

template<typename T >
void sheaf::depth_first_itr< T >::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 575 of file depth_first_itr.impl.h.

References sheaf::scoped_index::hub_pod(), and sheaf::depth_first_itr< T >::initialize_anchor().

◆ invariant()

template<typename T >
bool sheaf::depth_first_itr< T >::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_itr< T >, sheaf::triorder_itr< T >, sheaf::preorder_itr< T >, sheaf::linkorder_itr< T >, and sheaf::postorder_itr< T >.

Definition at line 2191 of file depth_first_itr.impl.h.

References sheaf::any::invariant().

Referenced by sheaf::depth_first_itr< T >::clone().

◆ is_ancestor_of()

template<typename T >
bool sheaf::depth_first_itr< T >::is_ancestor_of ( const any other) const
virtual

◆ is_done()

◆ is_initialized()

◆ is_maximal()

template<typename T >
bool sheaf::depth_first_itr< T >::is_maximal ( )

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

Precondition
Postcondition

Definition at line 1967 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::greater_index(), and sheaf::is_valid().

Referenced by sheaf::depth_first_itr< T >::put_visit_once().

◆ lesser_index()

template<typename T >
const sheaf::scoped_index & sheaf::depth_first_itr< T >::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 2014 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::action().

Referenced by sheaf::depth_first_itr< T >::greater_index().

◆ mark_not_visited()

template<typename T >
void sheaf::depth_first_itr< T >::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 371 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::attach_item(), sheaf::poset_component::index(), and sheaf::poset_component::is_attached().

Referenced by sheaf::depth_first_itr< T >::mark_visited().

◆ mark_visited()

template<typename T >
void sheaf::depth_first_itr< T >::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 348 of file depth_first_itr.impl.h.

References sheaf::poset_component::index(), sheaf::poset_component::is_attached(), and sheaf::depth_first_itr< T >::mark_not_visited().

Referenced by sheaf::depth_first_itr< T >::first().

◆ next() [1/2]

◆ next() [2/2]

template<typename T >
void sheaf::depth_first_itr< T >::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.

Definition at line 1295 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::reset().

◆ operator=()

◆ order()

◆ put_has_visited() [1/5]

template<>
void sheaf::depth_first_itr< sheaf::zn_to_bool >::put_has_visited ( pod_index_type  xindex,
bool  xvalue 
)
Precondition
  • anchor().host()->contains_member(xindex, true)
Postcondition
  • has_visited(xindex) == xvalue

Definition at line 104 of file depth_first_itr.cc.

◆ put_has_visited() [2/5]

template<>
void sheaf::depth_first_itr< std::set< sheaf::pod_index_type > >::put_has_visited ( pod_index_type  xindex,
bool  xvalue 
)
Precondition
  • anchor().host()->contains_member(xindex)
Postcondition
  • has_visited(xindex) == xvalue

Definition at line 197 of file depth_first_itr.cc.

◆ put_has_visited() [3/5]

template<>
void sheaf::depth_first_itr< unordered::unordered_set< sheaf::pod_index_type > >::put_has_visited ( pod_index_type  xindex,
bool  xvalue 
)
Precondition
  • anchor().host()->contains_member(xindex)
Postcondition
  • has_visited(xindex) == xvalue

Definition at line 301 of file depth_first_itr.cc.

◆ put_has_visited() [4/5]

template<typename T >
void sheaf::depth_first_itr< T >::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)
Not Implemented.
Postcondition
  • has_visited(xhub_id) == xvalue

Definition at line 1891 of file depth_first_itr.impl.h.

Referenced by sheaf::depth_first_itr< T >::has_visited(), and sheaf::depth_first_itr< T >::initialize_has_visited().

◆ put_has_visited() [5/5]

template<typename T >
void sheaf::depth_first_itr< T >::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 1915 of file depth_first_itr.impl.h.

References sheaf::scoped_index::hub_pod(), and sheaf::depth_first_itr< T >::visit_once().

◆ put_visit_once()

template<typename T >
void sheaf::depth_first_itr< T >::put_visit_once ( bool  xvisit_once)

Set visit_once() to xvisit_once.

Postcondition

Definition at line 1947 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::is_maximal().

Referenced by sheaf::depth_first_itr< T >::visit_once().

◆ release_cover_id_space_iterators()

template<typename T >
void sheaf::depth_first_itr< T >::release_cover_id_space_iterators ( )
protected

Release the cover iterators back to the pool of iterators.

Todo:
These assertions should be documented as preconditions.
Postcondition
  • _path_head_lc == 0
  • _path_head == 0
  • _path_tail.empty()

Definition at line 890 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::order().

Referenced by sheaf::depth_first_itr< T >::initialize_filter().

◆ reserve_has_visited()

template<typename T >
void sheaf::depth_first_itr< T >::reserve_has_visited ( pod_index_type  xub)

Ensures has_visited(i) is a legal call for 0 <= i < xub.

Is Abstract.

Definition at line 1815 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::has_visited().

Referenced by sheaf::depth_first_itr< T >::clear_has_visited().

◆ reset()

template<typename T >
void sheaf::depth_first_itr< T >::reset ( bool  xreset_markers = true)
virtual

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

Precondition
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 );

Definition at line 1717 of file depth_first_itr.impl.h.

References sheaf::depth_first_itr< T >::ct().

Referenced by sheaf::filtered_depth_first_itr< T >::filtered_depth_first_itr(), and sheaf::depth_first_itr< T >::next().

◆ strict()

◆ truncate()

template<typename T>
void sheaf::depth_first_itr< T >::truncate ( )
inline

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.

Definition at line 529 of file depth_first_itr.h.

Referenced by sheaf::abstract_poset_member::atom_ct(), sheaf::abstract_poset_member::atoms_pa(), and sheaf::member_record_set::make_internal_dataspace().

◆ visit_once()

template<typename T >
bool sheaf::depth_first_itr< T >::visit_once ( ) const

Member Data Documentation

◆ _action

template<typename T>
action_type sheaf::depth_first_itr< T >::_action
protected

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

Definition at line 277 of file depth_first_itr.h.

◆ _anchor

template<typename T>
abstract_poset_member* sheaf::depth_first_itr< T >::_anchor
protected

The top member of the down set being iterated over.

Definition at line 271 of file depth_first_itr.h.

Referenced by sheaf::filtered_depth_first_itr< T >::filtered_depth_first_itr().

◆ _client_filter

template<typename T>
subposet sheaf::depth_first_itr< T >::_client_filter
protected

The filter specified by the client.

Definition at line 298 of file depth_first_itr.h.

◆ _descending

◆ _filtered_path_tail

template<typename T>
std::stack<pod_index_type> sheaf::depth_first_itr< T >::_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 423 of file depth_first_itr.h.

◆ _greater_index

template<typename T>
scoped_index sheaf::depth_first_itr< T >::_greater_index
mutableprotected

The index of the greater member of the current link.

Definition at line 288 of file depth_first_itr.h.

◆ _index

template<typename T>
scoped_index sheaf::depth_first_itr< T >::_index
protected

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

Definition at line 283 of file depth_first_itr.h.

◆ _lesser_index

template<typename T>
scoped_index sheaf::depth_first_itr< T >::_lesser_index
mutableprotected

The index of the lesser member of the current link.

Definition at line 293 of file depth_first_itr.h.

◆ _new_filter

template<typename T>
bool sheaf::depth_first_itr< T >::_new_filter
protected

True if this allocated a new filter;.

Definition at line 303 of file depth_first_itr.h.

Referenced by sheaf::filtered_depth_first_itr< T >::filtered_depth_first_itr().

◆ _order

template<typename T>
order_type sheaf::depth_first_itr< T >::_order
protected

The order of the iteration.

Definition at line 318 of file depth_first_itr.h.

Referenced by sheaf::depth_first_itr< T >::operator=().

◆ _path_head

template<typename T>
index_space_iterator* sheaf::depth_first_itr< T >::_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 410 of file depth_first_itr.h.

◆ _path_head_lc

template<typename T>
index_space_iterator* sheaf::depth_first_itr< T >::_path_head_lc
protected

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

Definition at line 404 of file depth_first_itr.h.

◆ _path_tail

template<typename T>
std::stack<index_space_iterator*> sheaf::depth_first_itr< T >::_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 416 of file depth_first_itr.h.

◆ _state

template<typename T>
iterator_state sheaf::depth_first_itr< T >::_state
protected

The current state of iteration.

Definition at line 398 of file depth_first_itr.h.

◆ _strict

◆ _transition_fcn

template<typename T>
const iterator_state(* sheaf::depth_first_itr< T >::_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 358 of file depth_first_itr.h.

◆ _visit_once

template<typename T>
bool sheaf::depth_first_itr< T >::_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 429 of file depth_first_itr.h.

Referenced by sheaf::depth_first_itr< T >::operator=().

◆ BIORDER_TRANSITION_FCN

template<typename T>
const depth_first_itr< T >::iterator_state sheaf::depth_first_itr< T >::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 386 of file depth_first_itr.h.

◆ iterator_state_names

template<typename T>
const char * sheaf::depth_first_itr< T >::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 352 of file depth_first_itr.h.

◆ LINKORDER_TRANSITION_FCN

template<typename T>
const depth_first_itr< T >::iterator_state sheaf::depth_first_itr< T >::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 379 of file depth_first_itr.h.

◆ NULL_FILTER

template<typename T>
const char * sheaf::depth_first_itr< T >::NULL_FILTER = ""
static

Placeholder for null filter.

Definition at line 114 of file depth_first_itr.h.

◆ POSTORDER_TRANSITION_FCN

template<typename T>
const depth_first_itr< T >::iterator_state sheaf::depth_first_itr< T >::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 372 of file depth_first_itr.h.

◆ PREORDER_TRANSITION_FCN

template<typename T>
const depth_first_itr< T >::iterator_state sheaf::depth_first_itr< T >::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 365 of file depth_first_itr.h.

◆ TRIORDER_TRANSITION_FCN

template<typename T>
const depth_first_itr< T >::iterator_state sheaf::depth_first_itr< T >::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 393 of file depth_first_itr.h.


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