CoinNodeHeap
Monotone heap.
Monotone heap.
Description
Updates MUST always decrease costs.
Public Methods
CoinNodeHeap
Default Constructor.
CoinNodeHeap(size_t numNodes)
Parameters:
numNodes(size_t)
~CoinNodeHeap
Destructor.
~CoinNodeHeap()
reset
Reset the values in the heap.
void reset()
update
Update, always in decreasing order, the cost of a node.
void update(size_t node, double cost)
Parameters:
node(size_t)cost(double)
removeFirst
Remove the next element, returning its cost.
double removeFirst(size_t * node)
Parameters:
node(size_t *) - used to store the element that was removed
isEmpty
Check if the cost of the nodes are set to infinity.
bool isEmpty()
Source
Header: layer-0/CoinUtils/src/CoinNodeHeap.hpp