11 #ifndef SKELETON_BLOCKER_ITERATORS_SKELETON_BLOCKERS_BLOCKERS_ITERATORS_H_ 12 #define SKELETON_BLOCKER_ITERATORS_SKELETON_BLOCKERS_BLOCKERS_ITERATORS_H_ 14 #include <boost/iterator/iterator_facade.hpp> 18 namespace skeleton_blocker {
26 template<
typename MapIteratorType,
typename ReturnType>
28 Blocker_iterator_internal<MapIteratorType, ReturnType>,
30 boost::forward_traversal_tag,
34 MapIteratorType current_position;
35 MapIteratorType end_of_map;
41 current_position(position), end_of_map(end_of_map_) { }
44 return current_position == other.current_position;
51 ReturnType dereference()
const {
52 return (current_position->second);
61 void goto_next_blocker() {
64 }
while (!(current_position == end_of_map) && !first_time_blocker_is_seen());
67 bool first_time_blocker_is_seen()
const {
68 return current_position->first == current_position->second->first_vertex();
78 template<
typename MapIteratorType,
typename ReturnType>
80 Blocker_iterator_around_vertex_internal<MapIteratorType, ReturnType>,
82 boost::forward_traversal_tag,
86 MapIteratorType current_position_;
92 current_position_(position) { }
95 this->current_position_ = other.current_position_;
100 return current_position_ == other.current_position_;
107 ReturnType dereference()
const {
108 return (current_position_->second);
111 MapIteratorType current_position() {
112 return this->current_position_;
118 namespace skbl = skeleton_blocker;
122 #endif // SKELETON_BLOCKER_ITERATORS_SKELETON_BLOCKERS_BLOCKERS_ITERATORS_H_ Iterator through the blockers of a vertex.
Definition: Skeleton_blockers_blockers_iterators.h:79
Iterator through the blockers of a vertex.
Definition: Skeleton_blockers_blockers_iterators.h:27
Definition: SimplicialComplexForAlpha.h:14