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
[legend]

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)

Constructor.

Parameters
gridMapthe grid map to iterate on.

Definition at line 14 of file GridMapIterator.cpp.

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

Copy constructor.

Parameters
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

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

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

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

bool grid_map::GridMapIterator::isPastEnd_
protected

Is iterator out of scope.

Definition at line 104 of file GridMapIterator.hpp.

size_t grid_map::GridMapIterator::linearIndex_
protected

Linear index.

Definition at line 101 of file GridMapIterator.hpp.

size_t grid_map::GridMapIterator::linearSize_
protected

Linear size of the data.

Definition at line 98 of file GridMapIterator.hpp.

Size grid_map::GridMapIterator::size_
protected

Size of the buffer.

Definition at line 92 of file GridMapIterator.hpp.

Index grid_map::GridMapIterator::startIndex_
protected

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 Sat Aug 1 2020 05:51:35