Public Member Functions | Protected Attributes
grid_map::GridMapIterator Class Reference

#include <GridMapIterator.hpp>

Inheritance diagram for grid_map::GridMapIterator:
Inheritance graph
[legend]

List of all members.

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.
size_t linearIndex_
 Linear index.
size_t linearSize_
 Linear size of the data.
Size size_
 Size of the buffer.
Index startIndex_
 Start index of the circular buffer.

Detailed Description

Iterator class to iterate trough the entire grid map.

Definition at line 21 of file GridMapIterator.hpp.


Constructor & Destructor Documentation

Constructor.

Parameters:
gridMapthe grid map to iterate on.

Definition at line 14 of file GridMapIterator.cpp.

Copy constructor.

Parameters:
otherthe object to copy.

Definition at line 23 of file GridMapIterator.cpp.


Member Function Documentation

Return the end iterator

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

Definition at line 73 of file GridMapIterator.cpp.

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`.

Returns:
the 1d linear index.

Definition at line 52 of file GridMapIterator.cpp.

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.

Indicates if iterator is past end.

Returns:
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.

Returns:
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.

Returns:
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++ ( ) [virtual]

Increase the iterator to the next element.

Returns:
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.

Parameters:
iteratorthe iterator to copy data from.
Returns:
a reference to *this.

Definition at line 32 of file GridMapIterator.cpp.


Member Data Documentation

Is iterator out of scope.

Definition at line 104 of file GridMapIterator.hpp.

Linear index.

Definition at line 101 of file GridMapIterator.hpp.

Linear size of the data.

Definition at line 98 of file GridMapIterator.hpp.

Size of the buffer.

Definition at line 92 of file GridMapIterator.hpp.

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:


grid_map_core
Author(s): P├ęter Fankhauser
autogenerated on Tue Jul 9 2019 05:06:13