22 #include "SheafSystem/depth_first_itr.impl.h" 36 #include "SheafSystem/zn_to_bool.h" 43 _has_visited->make_false_sa();
51 _has_visited->extend_to(xub);
62 require(is_initialized());
63 require(anchor().host()->contains_member(xindex,
true));
67 bool result = (*_has_visited)[xindex];
93 ensure(_has_visited != 0);
109 require(is_initialized());
110 require(anchor().host()->contains_member(xindex,
true));
114 _has_visited->put(xindex, xvalue);
118 ensure(has_visited(xindex) == xvalue);
127 #include "SheafSystem/std_set.h" 134 _has_visited->clear();
153 require(is_initialized());
154 require(anchor().state_is_read_accessible());
155 require(anchor().host()->contains_member(xindex));
160 (_has_visited->find(xindex) != _has_visited->end());
177 if(_has_visited != 0)
182 _has_visited =
new std::set<pod_index_type>;
186 ensure(_has_visited != 0);
202 require(is_initialized());
203 require(anchor().state_is_read_accessible());
204 require(anchor().host()->contains_member(xindex));
210 _has_visited->insert(xindex);
214 _has_visited->erase(xindex);
219 ensure(has_visited(xindex) == xvalue);
228 #include "SheafSystem/std_unordered_set.h" 235 _has_visited->clear();
245 _has_visited->rehash(xub/2);
256 require(is_initialized());
257 require(anchor().state_is_read_accessible());
258 require(anchor().host()->contains_member(xindex));
263 (_has_visited->find(xindex) != _has_visited->end());
281 if(_has_visited != 0)
286 _has_visited =
new unordered_set<pod_index_type>;
290 ensure(_has_visited != 0);
306 require(is_initialized());
307 require(anchor().state_is_read_accessible());
308 require(anchor().host()->contains_member(xindex));
314 _has_visited->insert(xindex);
318 _has_visited->erase(xindex);
323 ensure(has_visited(xindex) == xvalue);
void clear_has_visited()
Makes has_visited(i) false for all i.
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 havin...
poset_state_handle * host() const
The poset which this is a handle to a component of.
virtual void initialize_has_visited(const abstract_poset_member &xanchor)
Initializes the has_visited markers.
bool has_visited(pod_index_type xhub_id) const
True if this has already visited member with hub id xhub_id.
const pod_type & pod() const
The "plain old data" storage of this; the value in the external id space.
bool state_is_read_accessible() const
True if this is attached and if the state is accessible for read or access control is disabled...
void reserve_has_visited(pod_index_type xub)
Ensures has_visited(i) is a legal call for 0 <= i < xub.
A map from Zn (the integers mod n) to bools. A characteristic function used to represent subsets of Z...
The general depth-first iterator over the intersection of a poset member anchor's whole with its down...
int_type pod_index_type
The plain old data index type.
virtual scoped_index member_index_ub() const
The upper bound on the member_index;.
An abstract client handle for a member of a poset.