Public Member Functions | Private Attributes | List of all members
cost_map::SubmapIterator Class Reference

#include <submap_iterator.hpp>

Public Member Functions

const IndexgetSubmapIndex () const
 
bool isPastEnd () const
 
bool operator!= (const SubmapIterator &other) const
 
const Indexoperator* () const
 
SubmapIteratoroperator++ ()
 
SubmapIteratoroperator= (const SubmapIterator &other)
 
 SubmapIterator (const cost_map::SubmapGeometry &submap)
 
 SubmapIterator (const cost_map::CostMap &gridMap, const cost_map::BufferRegion &bufferRegion)
 
 SubmapIterator (const cost_map::CostMap &gridMap, const Index &submapStartIndex, const Size &submapSize)
 
 SubmapIterator (const SubmapIterator *other)
 

Private Attributes

Index index_
 Current index. More...
 
bool isPastEnd_
 Is iterator out of scope. More...
 
Size size_
 Size of the buffer. More...
 
Index startIndex_
 Start index of the circular buffer. More...
 
Index submapIndex_
 Current index in the submap. More...
 
Size submapSize_
 Submap buffer size. More...
 
Index submapStartIndex_
 Top left index of the submap. More...
 

Detailed Description

Iterator class to iterate through a rectangular part of the map (submap). Before using this iterator, make sure that the requested submap is actually contained in the grid map.

Definition at line 18 of file submap_iterator.hpp.

Constructor & Destructor Documentation

cost_map::SubmapIterator::SubmapIterator ( const cost_map::SubmapGeometry submap)

Constructor.

Parameters
submapthe submap geometry to iterate over.

Definition at line 16 of file src/lib/iterators/submap_iterator.cpp.

cost_map::SubmapIterator::SubmapIterator ( const cost_map::CostMap gridMap,
const cost_map::BufferRegion bufferRegion 
)

Constructor.

Parameters
submapthe buffer region of a grid map to iterate over.

Definition at line 21 of file src/lib/iterators/submap_iterator.cpp.

cost_map::SubmapIterator::SubmapIterator ( const cost_map::CostMap gridMap,
const Index submapStartIndex,
const Size submapSize 
)

Constructor.

Parameters
gridMapthe grid map to iterate on.
submapStartIndexthe start index of the submap, typically top-left index.
submapSizethe size of the submap to iterate on.

Definition at line 28 of file src/lib/iterators/submap_iterator.cpp.

cost_map::SubmapIterator::SubmapIterator ( const SubmapIterator other)

Copy constructor.

Parameters
otherthe object to copy.

Definition at line 40 of file src/lib/iterators/submap_iterator.cpp.

Member Function Documentation

const Eigen::Array2i & cost_map::SubmapIterator::getSubmapIndex ( ) const

Get the current index in the submap.

Returns
the current index in the submap.

Definition at line 73 of file src/lib/iterators/submap_iterator.cpp.

bool cost_map::SubmapIterator::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 85 of file src/lib/iterators/submap_iterator.cpp.

bool cost_map::SubmapIterator::operator!= ( const SubmapIterator other) const

Compare to another iterator.

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

Definition at line 63 of file src/lib/iterators/submap_iterator.cpp.

const Eigen::Array2i & cost_map::SubmapIterator::operator* ( ) const

Dereference the iterator with const.

Returns
the value to which the iterator is pointing.

Definition at line 68 of file src/lib/iterators/submap_iterator.cpp.

SubmapIterator & cost_map::SubmapIterator::operator++ ( )

Increase the iterator to the next element.

Returns
a reference to the updated iterator.

Definition at line 78 of file src/lib/iterators/submap_iterator.cpp.

SubmapIterator & cost_map::SubmapIterator::operator= ( const SubmapIterator other)

Assignment operator.

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

Definition at line 51 of file src/lib/iterators/submap_iterator.cpp.

Member Data Documentation

Index cost_map::SubmapIterator::index_
private

Current index.

Definition at line 95 of file submap_iterator.hpp.

bool cost_map::SubmapIterator::isPastEnd_
private

Is iterator out of scope.

Definition at line 107 of file submap_iterator.hpp.

Size cost_map::SubmapIterator::size_
private

Size of the buffer.

Definition at line 89 of file submap_iterator.hpp.

Index cost_map::SubmapIterator::startIndex_
private

Start index of the circular buffer.

Definition at line 92 of file submap_iterator.hpp.

Index cost_map::SubmapIterator::submapIndex_
private

Current index in the submap.

Definition at line 104 of file submap_iterator.hpp.

Size cost_map::SubmapIterator::submapSize_
private

Submap buffer size.

Definition at line 98 of file submap_iterator.hpp.

Index cost_map::SubmapIterator::submapStartIndex_
private

Top left index of the submap.

Definition at line 101 of file submap_iterator.hpp.


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


cost_map_core
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:03:41