Class pairing_queue::pairing_queue

template <typename P>
class pairing_queuepairing_queue

A priority queue based on a pairing heap, with fixed memory footprint and support for a decrease-key operation.

Subclassed by pairing_queue::pairing_queue_fast_reset< P >

Public Functions

void pairing_queue::pairing_queuereset_fill(const P &v)

Reset the queue and fill the values with a default.

void pairing_queue::pairing_queuereset()

Reset the queue and set the default to the maximum value.

bool pairing_queue::pairing_queuedelete_min()

Remove the minimum value return true if any change is made.

bool pairing_queue::pairing_queuepop_min(int &key, P &value)

Remove and return (in args) the minimum key, value pair.

void pairing_queue::pairing_queuedecrease_value(int k, const P &v)

Decrease the value of k to v NOTE: Assumes that v is lower than the current value of k.

bool pairing_queue::pairing_queuecheck_decrease_value(int k, const P &v)

Decrease the value of k to v Does nothing if v isn’t actually a decrease.