30#ifndef PAL_PRIORITYQUEUE_H
31#define PAL_PRIORITYQUEUE_H
39#define LEFT( x ) ( 2 * x + 1 )
40#define RIGHT( x ) ( 2 * x + 2 )
41#define PARENT( x ) ( ( x - 1 ) / 2 )
73 bool isIn(
int key )
const;
78 void insert(
int key,
double p );
89 int getId(
int key )
const;
95 std::unique_ptr<int[]> heap;
96 std::unique_ptr<double[]> p;
97 std::unique_ptr<int[]> pos;
99 bool ( *greater )(
double l,
double r );
PriorityQueue(const PriorityQueue &)=delete
PriorityQueue(int n, int maxId, bool min)
Create a priority queue of max size n \param n max size of the queuet \param p external vector repres...
void decreaseKey(int key)
void setPriority(int key, double new_p)
void insert(int key, double p)
PriorityQueue & operator=(const PriorityQueue &)=delete