cheshirekow  v0.1.0
iterators.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Josh Bialkowski (jbialk@mit.edu)
3  *
4  * This file is part of mpblocks.
5  *
6  * mpblocks is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * mpblocks is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with mpblocks. If not, see <http://www.gnu.org/licenses/>.
18  */
26 #ifndef EDELSBRUNNER96_ITERATORS_HPP_
27 #define EDELSBRUNNER96_ITERATORS_HPP_
28 
30 
31 namespace edelsbrunner96 {
32 namespace iter {
33 
34 template <class Traits>
36  if (queue_iter_ != queue_->end()) {
37  SimplexRef simplex_ref = *queue_iter_;
38  for (SimplexRef neighbor_ref : storage_[simplex_ref].N) {
39  if (!storage_[neighbor_ref].marked[simplex::BFS_QUEUED]) {
40  storage_[neighbor_ref].marked[simplex::BFS_QUEUED] = true;
41  queue_->push_back(neighbor_ref);
42  }
43  }
44  }
45  ++queue_iter_;
46  return *this;
47 }
48 
49 } // namespace iter
50 } // namespace edelsbrunner96
51 
52 #endif // EDELSBRUNNER96_ITERATORS_HPP_
BreadthFirst< Traits > & operator++()
Definition: iterators.hpp:35
has been queud in breadth-first search
Definition: simplex.h:51
Traits::SimplexRef SimplexRef
Definition: iterators.h:39