ompl::GridN< _T > Class Template Reference

Representation of a grid where cells keep track of how many neighbors they have. More...

#include <GridN.h>

Inheritance diagram for ompl::GridN< _T >:
Inheritance graph
[legend]

List of all members.

Classes

struct  Cell
 Definition of a cell in this grid. More...

Public Types

typedef Grid< _T >::Cell BaseCell
 Datatype for cell in base class.
typedef Grid< _T >::CellArray BaseCellArray
 Datatype for array of cells in base class.
typedef std::vector< Cell * > CellArray
 The datatype for arrays of cells.
typedef Grid< _T >::Coord Coord
 Datatype for cell coordinates.

Public Member Functions

virtual BaseCellcreateCell (const Coord &coord, BaseCellArray *nbh=NULL)
CellgetCell (const Coord &coord) const
 Get the cell at a specified coordinate.
void getCells (CellArray &cells) const
 Get the set of instantiated cells in the grid.
 GridN (unsigned int dimension)
 The constructor takes the dimension of the grid as argument.
void neighbors (Coord &coord, CellArray &list) const
 Get the list of neighbors for a given coordinate.
void neighbors (const Coord &coord, CellArray &list) const
 Get the list of neighbors for a given coordinate.
void neighbors (const Cell *cell, CellArray &list) const
 Get the list of neighbors for a given cell.
virtual bool remove (BaseCell *cell)
void setBounds (const Coord &low, const Coord &up)
void setDimension (unsigned int dimension)
void setInteriorCellNeighborLimit (unsigned int count)
virtual ~GridN (void)

Protected Member Functions

unsigned int numberOfBoundaryDimensions (const Coord &coord) const
 Compute how many sides of a coordinate touch the boundaries of the grid.

Protected Attributes

bool hasBounds_
 Flag indicating whether bounds are in effect for this grid.
unsigned int interiorCellNeighborsLimit_
Coord lowBound_
 If bounds are set, this defines the lower corner cell.
bool overrideCellNeighborsLimit_
Coord upBound_
 If bounds are set, this defines the upper corner cell.

Detailed Description

template<typename _T>
class ompl::GridN< _T >

Representation of a grid where cells keep track of how many neighbors they have.

Definition at line 47 of file GridN.h.


Member Typedef Documentation

template<typename _T>
typedef Grid<_T>::Cell ompl::GridN< _T >::BaseCell

Datatype for cell in base class.

Definition at line 52 of file GridN.h.

template<typename _T>
typedef Grid<_T>::CellArray ompl::GridN< _T >::BaseCellArray

Datatype for array of cells in base class.

Definition at line 55 of file GridN.h.

template<typename _T>
typedef std::vector<Cell*> ompl::GridN< _T >::CellArray

The datatype for arrays of cells.

Reimplemented from ompl::Grid< _T >.

Reimplemented in ompl::GridB< _T, LessThanExternal, LessThanInternal >, and ompl::GridB< CellData *, OrderCellsByImportance >.

Definition at line 79 of file GridN.h.

template<typename _T>
typedef Grid<_T>::Coord ompl::GridN< _T >::Coord

Datatype for cell coordinates.

Reimplemented from ompl::Grid< _T >.

Reimplemented in ompl::GridB< _T, LessThanExternal, LessThanInternal >, and ompl::GridB< CellData *, OrderCellsByImportance >.

Definition at line 58 of file GridN.h.


Constructor & Destructor Documentation

template<typename _T>
ompl::GridN< _T >::GridN ( unsigned int  dimension  )  [inline, explicit]

The constructor takes the dimension of the grid as argument.

Definition at line 84 of file GridN.h.

template<typename _T>
virtual ompl::GridN< _T >::~GridN ( void   )  [inline, virtual]

Definition at line 91 of file GridN.h.


Member Function Documentation

template<typename _T>
virtual BaseCell* ompl::GridN< _T >::createCell ( const Coord coord,
BaseCellArray nbh = NULL 
) [inline, virtual]

Instantiate a new cell at given coordinates; Optionally return the list of future neighbors. Note: this call only creates the cell, but does not add it to the grid. It however updates the neighbor count for neighboring cells

Definition at line 166 of file GridN.h.

template<typename _T>
Cell* ompl::GridN< _T >::getCell ( const Coord coord  )  const [inline]

Get the cell at a specified coordinate.

Reimplemented from ompl::Grid< _T >.

Definition at line 132 of file GridN.h.

template<typename _T>
void ompl::GridN< _T >::getCells ( CellArray cells  )  const [inline]

Get the set of instantiated cells in the grid.

Reimplemented from ompl::Grid< _T >.

Definition at line 219 of file GridN.h.

template<typename _T>
void ompl::GridN< _T >::neighbors ( Coord coord,
CellArray list 
) const [inline]

Get the list of neighbors for a given coordinate.

Reimplemented from ompl::Grid< _T >.

Definition at line 152 of file GridN.h.

template<typename _T>
void ompl::GridN< _T >::neighbors ( const Coord coord,
CellArray list 
) const [inline]

Get the list of neighbors for a given coordinate.

Reimplemented from ompl::Grid< _T >.

Definition at line 145 of file GridN.h.

template<typename _T>
void ompl::GridN< _T >::neighbors ( const Cell cell,
CellArray list 
) const [inline]

Get the list of neighbors for a given cell.

Reimplemented from ompl::Grid< _T >.

Definition at line 138 of file GridN.h.

template<typename _T>
unsigned int ompl::GridN< _T >::numberOfBoundaryDimensions ( const Coord coord  )  const [inline, protected]

Compute how many sides of a coordinate touch the boundaries of the grid.

Definition at line 229 of file GridN.h.

template<typename _T>
virtual bool ompl::GridN< _T >::remove ( BaseCell cell  )  [inline, virtual]

Remove a cell from the grid. If the cell has not been Added to the grid, only update the neighbor list

Reimplemented from ompl::Grid< _T >.

Reimplemented in ompl::GridB< _T, LessThanExternal, LessThanInternal >.

Definition at line 194 of file GridN.h.

template<typename _T>
void ompl::GridN< _T >::setBounds ( const Coord low,
const Coord up 
) [inline]

If bounds for the grid need to be considered, we can set them here. When the number of neighbors are counted, whether the Space is bounded matters, in the sense that if a cell is on the boundary, we know some of its neighbors cannot exist. In order to allow such a cell to reflect the fact it has Achieved its maximal number of neighbors, the boundary is counted as the number of neighbors it prevents from existing.

Definition at line 115 of file GridN.h.

template<typename _T>
void ompl::GridN< _T >::setDimension ( unsigned int  dimension  )  [inline]

Update the dimension of the grid; this should not be done unless the grid is empty

Reimplemented from ompl::Grid< _T >.

Definition at line 97 of file GridN.h.

template<typename _T>
void ompl::GridN< _T >::setInteriorCellNeighborLimit ( unsigned int  count  )  [inline]

Set the limit of neighboring cells to determine when a cell becomes interior by default, this is 2 * dimension of grid

Definition at line 124 of file GridN.h.


Member Data Documentation

template<typename _T>
bool ompl::GridN< _T >::hasBounds_ [protected]

Flag indicating whether bounds are in effect for this grid.

Definition at line 242 of file GridN.h.

template<typename _T>
unsigned int ompl::GridN< _T >::interiorCellNeighborsLimit_ [protected]

By default, cells are considered on the border if 2n neighbors are created, for a space of dimension n. this value is overridden and set in this member variable

Definition at line 253 of file GridN.h.

template<typename _T>
Coord ompl::GridN< _T >::lowBound_ [protected]

If bounds are set, this defines the lower corner cell.

Definition at line 245 of file GridN.h.

template<typename _T>
bool ompl::GridN< _T >::overrideCellNeighborsLimit_ [protected]

Flag indicating whether the neighbor count used to determine whether a cell is on the border or not

Definition at line 257 of file GridN.h.

template<typename _T>
Coord ompl::GridN< _T >::upBound_ [protected]

If bounds are set, this defines the upper corner cell.

Definition at line 248 of file GridN.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


ompl
Author(s): Ioan Sucan/isucan@rice.edu, Mark Moll/mmoll@rice.edu, Lydia Kavraki/kavraki@rice.edu
autogenerated on Fri Jan 11 09:33:58 2013