QGIS API Documentation
Public Member Functions | List of all members
pal::PriorityQueue Class Reference

#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)
 

Detailed Description

Note
not available in Python bindings

Definition at line 46 of file priorityqueue.h.

Constructor & Destructor Documentation

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 66 of file priorityqueue.cpp.

Member Function Documentation

void PriorityQueue::decreaseKey ( int  key)

Definition at line 270 of file priorityqueue.cpp.

void PriorityQueue::downheap ( int  id)

Definition at line 208 of file priorityqueue.cpp.

int PriorityQueue::getBest ( )

Definition at line 79 of file priorityqueue.cpp.

int PriorityQueue::getId ( int  key)

Definition at line 108 of file priorityqueue.cpp.

int PriorityQueue::getSize ( )

Definition at line 73 of file priorityqueue.cpp.

int PriorityQueue::getSizeByPos ( )

Definition at line 304 of file priorityqueue.cpp.

void PriorityQueue::insert ( int  key,
double  p 
)

Definition at line 113 of file priorityqueue.cpp.

bool PriorityQueue::isIn ( int  key)

Definition at line 103 of file priorityqueue.cpp.

void PriorityQueue::print ( )

Definition at line 288 of file priorityqueue.cpp.

void PriorityQueue::remove ( int  key)

Definition at line 131 of file priorityqueue.cpp.

void PriorityQueue::setPriority ( int  key,
double  new_p 
)

Definition at line 249 of file priorityqueue.cpp.

void PriorityQueue::sort ( )

Definition at line 151 of file priorityqueue.cpp.

void PriorityQueue::upheap ( int  key)

Definition at line 165 of file priorityqueue.cpp.


The documentation for this class was generated from the following files: