All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
GridB.h
138 return external_.empty() ? 0.0 : (double)(external_.size()) / (double)(external_.size() + internal_.size());
Cell * topExternal() const
Return the cell that is at the top of the heap maintaining external cells.
Definition: GridB.h:117
Cell * topInternal() const
Return the cell that is at the top of the heap maintaining internal cells.
Definition: GridB.h:110
virtual void status(std::ostream &out=std::cout) const
Print information about the data in this grid structure.
Definition: Grid.h:306
void getCells(CellArray &cells) const
Get the set of instantiated cells in the grid.
Definition: GridN.h:219
virtual void status(std::ostream &out=std::cout) const
Print information about the data in this grid structure.
Definition: GridB.h:282
void update(Cell *cell)
Update the position in the heaps for a particular cell.
Definition: GridB.h:148
unsigned int numberOfBoundaryDimensions(const Coord &coord) const
Compute how many sides of a coordinate touch the boundaries of the grid.
Definition: GridN.h:229
Element * top() const
Return the top element. nullptr for an empty heap.
Definition: BinaryHeap.h:115
EventCellUpdate eventCellUpdate_
Pointer to function to be called when a cell needs to be updated.
Definition: GridB.h:292
BinaryHeap< CellX *, LessThanInternalCell > internalBHeap
Datatype for a heap of cells containing interior cells.
Definition: GridB.h:342
Representation of a grid where cells keep track of how many neighbors they have.
Definition: GridN.h:47
static void setHeapElementE(typename externalBHeap::Element *element, void *)
Routine used internally for keeping track of binary heap elements for external cells.
Definition: GridB.h:354
static void setHeapElementI(typename internalBHeap::Element *element, void *)
Routine used internally for keeping track of binary heap elements for internal cells.
Definition: GridB.h:348
void onAfterInsert(EventAfterInsert event, void *arg)
Set the event that gets called after insertion.
Definition: BinaryHeap.h:92
BinaryHeap< CellX *, LessThanExternalCell > externalBHeap
Datatype for a heap of cells containing exterior cells.
Definition: GridB.h:345
static void noCellUpdate(Cell *, void *)
Default no-op update routine for a cell.
Definition: GridB.h:298
void neighbors(const Cell *cell, CellArray &list) const
Get the list of neighbors for a given cell.
Definition: GridN.h:138
void setupHeaps()
Set the update procedure for the heaps of internal and external cells.
Definition: GridB.h:303
This class defines a grid that keeps track of its boundary: it distinguishes between interior and ext...
Definition: GridB.h:51
void(* EventCellUpdate)(Cell *, void *)
Event to be called when a cell's priority is to be updated.
Definition: GridB.h:87
virtual Cell * createCell(const Coord &coord, CellArray *nbh=nullptr)
Create a cell but do not add it to the grid; update neighboring cells however.
Definition: GridB.h:171