ompl::GridB< _T, LessThanExternal, LessThanInternal > Class Template Reference

This class defines a grid that keeps track of its boundary: it distinguishes between interior and exterior cells. More...

#include <ompl/datastructures/GridB.h>

Inheritance diagram for ompl::GridB< _T, LessThanExternal, LessThanInternal >:

List of all members.

Classes

struct  LessThanExternalCell
 Define order for external cells. More...
struct  LessThanInternalCell
 Define order for internal 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 *)

Public Member Functions

 GridB (unsigned int dimension)
 Constructor.
void onCellUpdate (EventCellUpdate event, void *arg)
CelltopInternal () const
 Return the cell that is at the top of the heap maintaining internal cells.
CelltopExternal () const
 Return the cell that is at the top of the heap maintaining external cells.
unsigned int countInternal () const
 Return the number of internal cells.
unsigned int countExternal () const
 Return the number of external cells.
double fracExternal () const
 Return the fraction of external cells.
double fracInternal () const
 Return the fraction of internal cells.
void update (Cell *cell)
 Update the position in the heaps for a particular cell.
void updateAll ()
 Update all cells and reconstruct the heaps.
virtual CellcreateCell (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 ()
 Clear all cells in the grid.
virtual void status (std::ostream &out=std::cout) const
 Print information about the data in this grid structure.

Protected Types

typedef BinaryHeap< CellX
*, LessThanInternalCell
internalBHeap
 Datatype for a heap of cells containing interior cells.
typedef BinaryHeap< CellX
*, LessThanExternalCell
externalBHeap
 Datatype for a heap of cells containing exterior cells.

Protected Member Functions

void setupHeaps ()
 Set the update procedure for the heaps of internal and external cells.
void clearHeaps ()
 Clear the data from both heaps.

Static Protected Member Functions

static void noCellUpdate (Cell *, void *)
 Default no-op update routine for a cell.
static void setHeapElementI (typename internalBHeap::Element *element, void *)
 Routine used internally for keeping track of binary heap elements for internal cells.
static void setHeapElementE (typename externalBHeap::Element *element, void *)
 Routine used internally for keeping track of binary heap elements for external cells.

Protected Attributes

EventCellUpdate eventCellUpdate_
 Pointer to function to be called when a cell needs to be updated.
void * eventCellUpdateData_
 Data to be passed to function pointer above.
internalBHeap internal_
 The heap of interior cells.
externalBHeap external_
 The heap of external cells.

Detailed Description

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.


Member Typedef Documentation

template<typename _T, class LessThanExternal = std::less<_T>, class LessThanInternal = LessThanExternal>
typedef void(* ompl::GridB< _T, LessThanExternal, LessThanInternal >::EventCellUpdate)(Cell *, void *)

Event to be called when a cell's priority is to be updated

Definition at line 87 of file GridB.h.


Member Function Documentation

template<typename _T, class LessThanExternal = std::less<_T>, class LessThanInternal = LessThanExternal>
void ompl::GridB< _T, LessThanExternal, LessThanInternal >::onCellUpdate ( EventCellUpdate  event,
void *  arg 
) [inline]

Set the function callback and to be called when a cell's priority is updated

Definition at line 103 of file GridB.h.


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