Representation of a grid where cells keep track of how many neighbors they have. More...
#include <GridN.h>
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 BaseCell * | createCell (const Coord &coord, BaseCellArray *nbh=NULL) |
Cell * | getCell (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. |
Representation of a grid where cells keep track of how many neighbors they have.
Definition at line 47 of file GridN.h.
typedef Grid<_T>::Cell ompl::GridN< _T >::BaseCell |
typedef Grid<_T>::CellArray ompl::GridN< _T >::BaseCellArray |
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 >.
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 >.
ompl::GridN< _T >::GridN | ( | unsigned int | dimension | ) | [inline, explicit] |
virtual ompl::GridN< _T >::~GridN | ( | void | ) | [inline, virtual] |
virtual BaseCell* ompl::GridN< _T >::createCell | ( | const Coord & | coord, | |
BaseCellArray * | nbh = NULL | |||
) | [inline, virtual] |
Cell* ompl::GridN< _T >::getCell | ( | const Coord & | coord | ) | const [inline] |
Get the cell at a specified coordinate.
Reimplemented from ompl::Grid< _T >.
void ompl::GridN< _T >::getCells | ( | CellArray & | cells | ) | const [inline] |
Get the set of instantiated cells in the grid.
Reimplemented from ompl::Grid< _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 >.
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 >.
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 >.
unsigned int ompl::GridN< _T >::numberOfBoundaryDimensions | ( | const Coord & | coord | ) | const [inline, protected] |
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 >.
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.
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 >.
void ompl::GridN< _T >::setInteriorCellNeighborLimit | ( | unsigned int | count | ) | [inline] |
bool ompl::GridN< _T >::hasBounds_ [protected] |
unsigned int ompl::GridN< _T >::interiorCellNeighborsLimit_ [protected] |
Coord ompl::GridN< _T >::lowBound_ [protected] |
bool ompl::GridN< _T >::overrideCellNeighborsLimit_ [protected] |
Coord ompl::GridN< _T >::upBound_ [protected] |