21 #ifndef DEPTH_FIRST_ITERATOR_H 22 #define DEPTH_FIRST_ITERATOR_H 24 #ifndef SHEAF_DLL_SPEC_H 25 #include "SheafSystem/sheaf_dll_spec.h" 29 #include "SheafSystem/any.h" 32 #ifndef POSET_STATE_HANDLE_H 33 #include "SheafSystem/poset_state_handle.h" 37 #include "SheafSystem/std_stack.h" 41 #include "SheafSystem/subposet.h" 44 #ifndef TOTAL_POSET_MEMBER_H 45 #include "SheafSystem/total_poset_member.h" 100 virtual bool is_ancestor_of(
const any* other)
const;
110 bool invariant()
const;
190 virtual bool is_initialized()
const;
212 bool descending()
const;
228 bool is_done()
const;
233 virtual void force_is_done();
262 virtual void next(
bool xtruncate);
267 virtual void reset(
bool xreset_markers =
true);
273 int ct(
bool xreset =
false);
302 void put_has_visited(
const scoped_index& xid,
bool xvalue);
308 bool visit_once()
const;
313 void put_visit_once(
bool xvisit_once);
319 bool is_maximal()
const;
357 size_t depth()
const;
396 virtual void attach_item();
402 virtual void detach_item();
422 void initialize_traversal(
const scoped_index& xanchor_id);
448 void put_has_visited(
zn_to_bool* xhas_visited);
456 return (*_filter)[xhub_id];
464 return (*_filter)[xid.
hub_pod()];
470 void initialize_filter();
476 void initialize_filter(
const subposet& xfilter);
494 void initialize_filter(
const std::string& xfilter_name);
499 void release_cover_id_space_iterators();
562 ERASE_COVER_ITERATOR,
566 EXECUTE_PREVISIT_ACTION,
568 EXECUTE_POSTVISIT_ACTION,
585 static const char* iterator_state_names[NOT_A_STATE+1];
633 static const transition_fcn_type STD_TRANSITION_FCNS[NOT_AN_ORDER+1];
694 #endif // ifndef DEPTH_FIRST_ITERATOR_H A client handle for a subposet.
void truncate()
Makes this the next member of the subset which is not less than old this, i.e. the depth-first descen...
An abstract iterator over the ids of an id space.
abstract_poset_member * _anchor
The top member of the down set being iterated over.
static const char * NULL_FILTER
Placeholder for null filter.
action_type _action
The type of action the client should take; the state of the iterator.
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 pas...
bool _visit_once
True if traversal should only visit a member once; that is, it should not revisit members it has alre...
order_type
The types of order in which the iterator will visit the members of the poset. Determines which action...
subposet _client_filter
The filter specified by the client.
Abstract base class with useful features for all objects.
A map from Zn (the integers mod n) to bools. A characteristic function used to represent subsets of Z...
iterator_token
The input tokens for the finite state machine.
action_type
The types of action a client should take when the iterator returns control to the client...
An index within the external ("client") scope of a given id space.
scoped_index _lesser_index
The index of the lesser member of the current link.
bool filter(pod_index_type xhub_id) const
The value of the filter at hub id xhub_id.
bool _new_filter
True if this allocated a new filter;.
void next()
Makes this the next member of the subset.
scoped_index _greater_index
The index of the greater member of the current link.
index_space_iterator * _path_head
The head of the path to the current member of the iteration lesser_index() == this->index() == **_pat...
index_space_iterator * _path_head_lc
The lower cover iterator for the head of the path to the current member of the iteration.
bool _descending
True if iterating over the up/down set of anchor.
iterator_state _state
The current state of iteration.
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.
int_type pod_index_type
The plain old data index type.
iterator_state
The states for the finite state machine that controls iteration.
Namespace for the sheaves component of the sheaf system.
bool _strict
True if iterating over the strict up/down set of anchor.
An abstract client handle for a member of a poset.
bool filter(const scoped_index &xid) const
The value of the filter at id xid.
scoped_index _index
The index of the lesser end of the current link; the current item in the iteration.
order_type _order
The order of the iteration.
pod_type hub_pod() const
The pod value of this mapped to the unglued hub id space.