23 #ifndef SKELETON_BLOCKER_ITERATORS_SKELETON_BLOCKERS_BLOCKERS_ITERATORS_H_ 24 #define SKELETON_BLOCKER_ITERATORS_SKELETON_BLOCKERS_BLOCKERS_ITERATORS_H_ 26 #include <boost/iterator/iterator_facade.hpp> 30 namespace skeleton_blocker {
38 template<
typename MapIteratorType,
typename ReturnType>
40 Blocker_iterator_internal<MapIteratorType, ReturnType>,
42 boost::forward_traversal_tag,
46 MapIteratorType current_position;
47 MapIteratorType end_of_map;
53 current_position(position), end_of_map(end_of_map_) { }
56 return current_position == other.current_position;
63 ReturnType dereference()
const {
64 return (current_position->second);
73 void goto_next_blocker() {
76 }
while (!(current_position == end_of_map) && !first_time_blocker_is_seen());
79 bool first_time_blocker_is_seen()
const {
80 return current_position->first == current_position->second->first_vertex();
90 template<
typename MapIteratorType,
typename ReturnType>
92 Blocker_iterator_around_vertex_internal<MapIteratorType, ReturnType>,
94 boost::forward_traversal_tag,
98 MapIteratorType current_position_;
104 current_position_(position) { }
107 this->current_position_ = other.current_position_;
112 return current_position_ == other.current_position_;
119 ReturnType dereference()
const {
120 return (current_position_->second);
123 MapIteratorType current_position() {
124 return this->current_position_;
130 namespace skbl = skeleton_blocker;
134 #endif // SKELETON_BLOCKER_ITERATORS_SKELETON_BLOCKERS_BLOCKERS_ITERATORS_H_ Iterator through the blockers of a vertex.
Definition: Skeleton_blockers_blockers_iterators.h:91
Iterator through the blockers of a vertex.
Definition: Skeleton_blockers_blockers_iterators.h:39
Definition: SimplicialComplexForAlpha.h:26