QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
#include <priorityqueue.h>
Public Member Functions | |
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 representing the priority @param min best element has the smalest p when min is True ans has the biggest when min is false. More... | |
~PriorityQueue () | |
void | decreaseKey (int key) |
void | downheap (int id) |
int | getBest () |
int | getId (int key) |
int | getSize () |
int | getSizeByPos () |
void | insert (int key, double p) |
bool | isIn (int key) |
void | print () |
void | remove (int key) |
void | setPriority (int key, double new_p) |
void | sort () |
void | upheap (int key) |
Definition at line 47 of file priorityqueue.h.
PriorityQueue::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 representing the priority @param min best element has the smalest p when min is True ans has the biggest when min is false.
Definition at line 48 of file priorityqueue.cpp.
PriorityQueue::~PriorityQueue | ( | ) |
Definition at line 69 of file priorityqueue.cpp.
void PriorityQueue::decreaseKey | ( | int | key | ) |
Definition at line 273 of file priorityqueue.cpp.
void PriorityQueue::downheap | ( | int | id | ) |
Definition at line 211 of file priorityqueue.cpp.
int PriorityQueue::getBest | ( | ) |
Definition at line 82 of file priorityqueue.cpp.
int PriorityQueue::getId | ( | int | key | ) |
Definition at line 111 of file priorityqueue.cpp.
int PriorityQueue::getSize | ( | ) |
Definition at line 76 of file priorityqueue.cpp.
int PriorityQueue::getSizeByPos | ( | ) |
Definition at line 307 of file priorityqueue.cpp.
void PriorityQueue::insert | ( | int | key, |
double | p | ||
) |
Definition at line 116 of file priorityqueue.cpp.
bool PriorityQueue::isIn | ( | int | key | ) |
Definition at line 106 of file priorityqueue.cpp.
void PriorityQueue::print | ( | ) |
Definition at line 291 of file priorityqueue.cpp.
void PriorityQueue::remove | ( | int | key | ) |
Definition at line 134 of file priorityqueue.cpp.
void PriorityQueue::setPriority | ( | int | key, |
double | new_p | ||
) |
Definition at line 252 of file priorityqueue.cpp.
void PriorityQueue::sort | ( | ) |
Definition at line 154 of file priorityqueue.cpp.
void PriorityQueue::upheap | ( | int | key | ) |
Definition at line 168 of file priorityqueue.cpp.