Public Member Functions | Protected Attributes | List of all members
grid_map::GridMapIterator Class Reference

#include <GridMapIterator.hpp>

Inheritance diagram for grid_map::GridMapIterator:
Inheritance graph

Public Member Functions

GridMapIterator end () const
const size_t & getLinearIndex () const
const Index getUnwrappedIndex () const
 GridMapIterator (const grid_map::GridMap &gridMap)
 GridMapIterator (const GridMapIterator *other)
bool isPastEnd () const
bool operator!= (const GridMapIterator &other) const
const Index operator* () const
virtual GridMapIteratoroperator++ ()
GridMapIteratoroperator= (const GridMapIterator &other)

Protected Attributes

bool isPastEnd_
 Is iterator out of scope. More...
size_t linearIndex_
 Linear index. More...
size_t linearSize_
 Linear size of the data. More...
Size size_
 Size of the buffer. More...
Index startIndex_
 Start index of the circular buffer. More...

Detailed Description

Iterator class to iterate trough the entire grid map.

Definition at line 21 of file GridMapIterator.hpp.

Constructor & Destructor Documentation

grid_map::GridMapIterator::GridMapIterator ( const grid_map::GridMap gridMap)


gridMapthe grid map to iterate on.

Definition at line 14 of file GridMapIterator.cpp.

grid_map::GridMapIterator::GridMapIterator ( const GridMapIterator other)

Copy constructor.

otherthe object to copy.

Definition at line 23 of file GridMapIterator.cpp.

Member Function Documentation

GridMapIterator grid_map::GridMapIterator::end ( ) const

Return the end iterator

the end iterator (useful when performing normal iterator processing with ++).

Definition at line 73 of file GridMapIterator.cpp.

const size_t & grid_map::GridMapIterator::getLinearIndex ( ) const

Returns the the linear (1-dim.) index of the cell the iterator is pointing at. Note: Use this access for improved efficiency when working with large maps. Example: See runGridMapIteratorVersion3() of grid_map_demos/src/iterator_benchmark.cpp.

the 1d linear index.

Definition at line 52 of file GridMapIterator.cpp.

const Index grid_map::GridMapIterator::getUnwrappedIndex ( ) const

Retrieve the index as unwrapped index, i.e., as the corresponding index of a grid map with no circular buffer offset.

Definition at line 57 of file GridMapIterator.cpp.

bool grid_map::GridMapIterator::isPastEnd ( ) const

Indicates if iterator is past end.

true if iterator is out of scope, false if end has not been reached.

Definition at line 80 of file GridMapIterator.cpp.

bool grid_map::GridMapIterator::operator!= ( const GridMapIterator other) const

Compare to another iterator.

whether the current iterator points to a different address than the other one.

Definition at line 42 of file GridMapIterator.cpp.

const Index grid_map::GridMapIterator::operator* ( ) const

Dereference the iterator to return the regular index (2-dim.) of the cell to which the iterator is pointing at.

the regular index (2-dim.) of the cell on which the iterator is pointing.

Definition at line 47 of file GridMapIterator.cpp.

GridMapIterator & grid_map::GridMapIterator::operator++ ( )

Increase the iterator to the next element.

a reference to the updated iterator.

Reimplemented in grid_map::SlidingWindowIterator.

Definition at line 62 of file GridMapIterator.cpp.

GridMapIterator & grid_map::GridMapIterator::operator= ( const GridMapIterator other)

Assignment operator.

iteratorthe iterator to copy data from.
a reference to *this.

Definition at line 32 of file GridMapIterator.cpp.

Member Data Documentation

bool grid_map::GridMapIterator::isPastEnd_

Is iterator out of scope.

Definition at line 104 of file GridMapIterator.hpp.

size_t grid_map::GridMapIterator::linearIndex_

Linear index.

Definition at line 101 of file GridMapIterator.hpp.

size_t grid_map::GridMapIterator::linearSize_

Linear size of the data.

Definition at line 98 of file GridMapIterator.hpp.

Size grid_map::GridMapIterator::size_

Size of the buffer.

Definition at line 92 of file GridMapIterator.hpp.

Index grid_map::GridMapIterator::startIndex_

Start index of the circular buffer.

Definition at line 95 of file GridMapIterator.hpp.

The documentation for this class was generated from the following files:

Author(s): P├ęter Fankhauser
autogenerated on Sat Aug 1 2020 05:51:35