QGIS API Documentation  2.8.2-Wien
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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.
 ~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

Definition at line 47 of file priorityqueue.h.

Constructor & Destructor Documentation

pal::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 53 of file priorityqueue.cpp.

pal::PriorityQueue::~PriorityQueue ( )

Definition at line 71 of file priorityqueue.cpp.

Member Function Documentation

void pal::PriorityQueue::decreaseKey ( int  key)

Definition at line 293 of file priorityqueue.cpp.

void pal::PriorityQueue::downheap ( int  id)

Definition at line 231 of file priorityqueue.cpp.

int pal::PriorityQueue::getBest ( )

Definition at line 84 of file priorityqueue.cpp.

int pal::PriorityQueue::getId ( int  key)

Definition at line 118 of file priorityqueue.cpp.

int pal::PriorityQueue::getSize ( )

Definition at line 78 of file priorityqueue.cpp.

int pal::PriorityQueue::getSizeByPos ( )

Definition at line 327 of file priorityqueue.cpp.

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

Definition at line 123 of file priorityqueue.cpp.

bool pal::PriorityQueue::isIn ( int  key)

Definition at line 113 of file priorityqueue.cpp.

void pal::PriorityQueue::print ( )

Definition at line 311 of file priorityqueue.cpp.

void pal::PriorityQueue::remove ( int  key)

Definition at line 145 of file priorityqueue.cpp.

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

Definition at line 272 of file priorityqueue.cpp.

void pal::PriorityQueue::sort ( )

Definition at line 174 of file priorityqueue.cpp.

void pal::PriorityQueue::upheap ( int  key)

Definition at line 188 of file priorityqueue.cpp.


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