This class defines a grid that keeps track of its boundary: it distinguishes between interior and exterior cells.
More...
Public Types |
typedef GridN< _T >::Cell | Cell |
| Definition of a cell in this grid.
|
typedef GridN< _T >::CellArray | CellArray |
| The datatype for arrays of cells.
|
typedef GridN< _T >::Coord | Coord |
| Datatype for cell coordinates.
|
typedef void(* | EventCellUpdate )(Cell *, void *) |
| Event to be called when a cell's priority is to be updated.
|
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 Grid< _T >::Coord | Coord |
| Datatype for cell coordinates.
|
typedef std::vector< Cell * > | CellArray |
| The datatype for arrays of cells.
|
typedef std::vector< int > | Coord |
| Definition of a coordinate within this grid.
|
typedef std::vector< Cell * > | CellArray |
| The datatype for arrays of cells.
|
typedef CoordHash::const_iterator | iterator |
| We only allow const iterators.
|
Public Member Functions |
| GridB (unsigned int dimension) |
| Constructor.
|
void | onCellUpdate (EventCellUpdate event, void *arg) |
Cell * | topInternal (void) const |
| Return the cell that is at the top of the heap maintaining internal cells.
|
Cell * | topExternal (void) const |
| Return the cell that is at the top of the heap maintaining external cells.
|
unsigned int | countInternal (void) const |
| Return the number of internal cells.
|
unsigned int | countExternal (void) const |
| Return the number of external cells.
|
double | fracExternal (void) const |
| Return the fraction of external cells.
|
double | fracInternal (void) const |
| Return the fraction of internal cells.
|
void | update (Cell *cell) |
| Update the position in the heaps for a particular cell.
|
void | updateAll (void) |
| Update all cells and reconstruct the heaps.
|
virtual Cell * | createCell (const Coord &coord, CellArray *nbh=NULL) |
| Create a cell but do not add it to the grid; update neighboring cells however.
|
virtual void | add (Cell *cell) |
| Add the cell to the grid.
|
virtual bool | remove (Cell *cell) |
| Remove a cell from the grid.
|
virtual void | clear (void) |
| Clear all cells in the grid.
|
virtual void | status (std::ostream &out=std::cout) const |
| Print information about the data in this grid structure.
|
| GridN (unsigned int dimension) |
| The constructor takes the dimension of the grid as argument.
|
void | setDimension (unsigned int dimension) |
void | setBounds (const Coord &low, const Coord &up) |
void | setInteriorCellNeighborLimit (unsigned int count) |
Cell * | getCell (const Coord &coord) const |
| Get the cell at a specified coordinate.
|
void | neighbors (const Cell *cell, CellArray &list) const |
| Get the list of neighbors for a given cell.
|
void | neighbors (const Coord &coord, CellArray &list) const |
| Get the list of neighbors for a given coordinate.
|
void | neighbors (Coord &coord, CellArray &list) const |
| Get the list of neighbors for a given coordinate.
|
void | getCells (CellArray &cells) const |
| Get the set of instantiated cells in the grid.
|
| Grid (unsigned int dimension) |
| The constructor takes the dimension of the grid as argument.
|
virtual | ~Grid (void) |
| Destructor.
|
unsigned int | getDimension (void) const |
| Return the dimension of the grid.
|
bool | has (const Coord &coord) const |
| Check if a cell exists at the specified coordinate.
|
std::vector< std::vector< Cell * > > | components (void) const |
| Get the connected components formed by the cells in this grid (based on neighboring relation)
|
virtual void | destroyCell (Cell *cell) const |
| Clear the memory occupied by a cell; do not call this function unless remove() was called first.
|
void | getContent (std::vector< _T > &content) const |
| Get the data stored in the cells we are aware of.
|
void | getCoordinates (std::vector< Coord * > &coords) const |
| Get the set of coordinates where there are cells.
|
void | printCoord (Coord &coord, std::ostream &out=std::cout) const |
| Print the value of a coordinate to a stream.
|
bool | empty (void) const |
| Check if the grid is empty.
|
unsigned int | size (void) const |
| Check the size of the grid.
|
iterator | begin (void) const |
| Return the begin() iterator for the grid.
|
iterator | end (void) const |
| Return the end() iterator for the grid.
|
template<typename _T, class LessThanExternal = std::less<_T>, class LessThanInternal = LessThanExternal>
class ompl::GridB< _T, LessThanExternal, LessThanInternal >
This class defines a grid that keeps track of its boundary: it distinguishes between interior and exterior cells.
Definition at line 51 of file GridB.h.