Template Class GridB

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

template<typename _T, class LessThanExternal = std::less<_T>, class LessThanInternal = LessThanExternal>
class GridB : public ompl::GridN<_T>

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

Public Types

using Cell = typename GridN<_T>::Cell

Definition of a cell in this grid.

using BaseCell = typename GridN<_T>::BaseCell
using CellArray = typename GridN<_T>::CellArray

The datatype for arrays of cells.

using Coord = typename GridN<_T>::Coord

Datatype for cell coordinates.

using EventCellUpdate = void (*)(Cell*, void*)

Event to be called when a cell’s priority is to be updated.

Public Functions

inline explicit GridB(unsigned int dimension)

Constructor.

inline ~GridB() override
inline void onCellUpdate(EventCellUpdate event, void *arg)

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

inline Cell *topInternal() const

Return the cell that is at the top of the heap maintaining internal cells.

inline Cell *topExternal() const

Return the cell that is at the top of the heap maintaining external cells.

inline unsigned int countInternal() const

Return the number of internal cells.

inline unsigned int countExternal() const

Return the number of external cells.

inline double fracExternal() const

Return the fraction of external cells.

inline double fracInternal() const

Return the fraction of internal cells.

inline void update(Cell *cell)

Update the position in the heaps for a particular cell.

inline void updateAll()

Update all cells and reconstruct the heaps.

inline virtual Cell *createCell(const Coord &coord, CellArray *nbh = nullptr)

Create a cell but do not add it to the grid; update neighboring cells however.

inline virtual void add(Cell *cell)

Add the cell to the grid.

inline bool remove(BaseCell *cell) override

Remove a cell from the grid.

inline virtual void clear() override

Clear all cells in the grid.

inline virtual void status(std::ostream &out = std::cout) const override

Print information about the data in this grid structure.

Protected Types

using internalBHeap = BinaryHeap<CellX*, LessThanInternalCell>

Datatype for a heap of cells containing interior cells.

using externalBHeap = BinaryHeap<CellX*, LessThanExternalCell>

Datatype for a heap of cells containing exterior cells.

Protected Functions

inline void setupHeaps()

Set the update procedure for the heaps of internal and external cells.

inline void clearHeaps()

Clear the data from both heaps.

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.

Protected Static Functions

static inline void noCellUpdate(Cell*, void*)

Default no-op update routine for a cell.

static inline void setHeapElementI(typename internalBHeap::Element *element, void*)

Routine used internally for keeping track of binary heap elements for internal cells.

static inline void setHeapElementE(typename externalBHeap::Element *element, void*)

Routine used internally for keeping track of binary heap elements for external cells.

struct LessThanExternalCell

Define order for external cells.

Public Functions

inline bool operator()(const CellX *const a, const CellX *const b) const
struct LessThanInternalCell

Define order for internal cells.

Public Functions

inline bool operator()(const CellX *const a, const CellX *const b) const