QGIS API Documentation  2.11.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules 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. 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

Definition at line 43 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 49 of file priorityqueue.cpp.

pal::PriorityQueue::~PriorityQueue ( )

Definition at line 67 of file priorityqueue.cpp.

Member Function Documentation

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

Definition at line 289 of file priorityqueue.cpp.

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

Definition at line 227 of file priorityqueue.cpp.

int pal::PriorityQueue::getBest ( )

Definition at line 80 of file priorityqueue.cpp.

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

Definition at line 114 of file priorityqueue.cpp.

int pal::PriorityQueue::getSize ( )

Definition at line 74 of file priorityqueue.cpp.

int pal::PriorityQueue::getSizeByPos ( )

Definition at line 323 of file priorityqueue.cpp.

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

Definition at line 119 of file priorityqueue.cpp.

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

Definition at line 109 of file priorityqueue.cpp.

void pal::PriorityQueue::print ( )

Definition at line 307 of file priorityqueue.cpp.

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

Definition at line 141 of file priorityqueue.cpp.

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

Definition at line 268 of file priorityqueue.cpp.

void pal::PriorityQueue::sort ( )

Definition at line 170 of file priorityqueue.cpp.

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

Definition at line 184 of file priorityqueue.cpp.


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