GridMapIterator.hpp
Go to the documentation of this file.
1 /*
2  * GridMapIterator.hpp
3  *
4  * Created on: Sep 22, 2014
5  * Author: Péter Fankhauser
6  * Institute: ETH Zurich, ANYbotics
7  */
8 
9 #pragma once
10 
12 
13 // Eigen
14 #include <Eigen/Core>
15 
16 namespace grid_map {
17 
22 {
23 public:
24 
29  GridMapIterator(const grid_map::GridMap &gridMap);
30 
35  GridMapIterator(const GridMapIterator* other);
36 
41  GridMapIterator(const GridMapIterator &other) = default;
42 
49 
54  bool operator !=(const GridMapIterator& other) const;
55 
61  const Index operator *() const;
62 
69  const size_t& getLinearIndex() const;
70 
75  const Index getUnwrappedIndex() const;
76 
81  virtual GridMapIterator& operator ++();
82 
87  GridMapIterator end() const;
88 
93  bool isPastEnd() const;
94 
95 protected:
96 
99 
102 
104  size_t linearSize_;
105 
107  size_t linearIndex_;
108 
111 
112  public:
113  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
114 };
115 
116 } /* namespace */
Eigen::Array2i Index
Definition: TypeDefs.hpp:22
GridMapIterator & operator=(const GridMapIterator &other)
Eigen::Array2i Size
Definition: TypeDefs.hpp:23
const Index operator*() const
size_t linearIndex_
Linear index.
bool isPastEnd_
Is iterator out of scope.
Size size_
Size of the buffer.
size_t linearSize_
Linear size of the data.
const Index getUnwrappedIndex() const
GridMapIterator(const grid_map::GridMap &gridMap)
GridMapIterator end() const
virtual GridMapIterator & operator++()
Index startIndex_
Start index of the circular buffer.
bool operator!=(const GridMapIterator &other) const
const size_t & getLinearIndex() const


grid_map_core
Author(s): Péter Fankhauser
autogenerated on Tue Jun 1 2021 02:13:27