QGIS API Documentation  2.7.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 print ()
 
int getSize ()
 
int getSizeByPos ()
 
bool isIn (int key)
 
int getBest ()
 
void remove (int key)
 
void insert (int key, double p)
 
void sort ()
 
void downheap (int id)
 
void upheap (int key)
 
void decreaseKey (int key)
 
void setPriority (int key, double new_p)
 
int getId (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: