QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
pal::PriorityQueue Class Reference

Custom priority queue for use in pal labeling engine. More...

#include <priorityqueue.h>

Public Member Functions

 PriorityQueue (const PriorityQueue &)=delete
 PriorityQueue cannot be copied.
 
 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 smallest p when min is true and has the biggest when min is false.
 
 ~PriorityQueue ()
 
void decreaseKey (int key)
 
void downheap (int id)
 
int getBest ()
 
int getId (int key) const
 
int getSize () const
 
int getSizeByPos () const
 
void insert (int key, double p)
 
bool isIn (int key) const
 
PriorityQueueoperator= (const PriorityQueue &)=delete
 PriorityQueue cannot be copied.
 
void print ()
 
void remove (int key)
 
void setPriority (int key, double new_p)
 
void sort ()
 
void upheap (int key)
 

Detailed Description

Custom priority queue for use in pal labeling engine.

Note
not available in Python bindings

Definition at line 52 of file priorityqueue.h.

Constructor & Destructor Documentation

◆ PriorityQueue() [1/2]

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 smallest p when min is true and has the biggest when min is false.

Definition at line 48 of file priorityqueue.cpp.

◆ ~PriorityQueue()

PriorityQueue::~PriorityQueue ( )

Definition at line 69 of file priorityqueue.cpp.

◆ PriorityQueue() [2/2]

pal::PriorityQueue::PriorityQueue ( const PriorityQueue )
delete

PriorityQueue cannot be copied.

Member Function Documentation

◆ decreaseKey()

void PriorityQueue::decreaseKey ( int  key)

Definition at line 273 of file priorityqueue.cpp.

◆ downheap()

void PriorityQueue::downheap ( int  id)

Definition at line 211 of file priorityqueue.cpp.

◆ getBest()

int PriorityQueue::getBest ( )

Definition at line 82 of file priorityqueue.cpp.

◆ getId()

int PriorityQueue::getId ( int  key) const

Definition at line 111 of file priorityqueue.cpp.

◆ getSize()

int PriorityQueue::getSize ( ) const

Definition at line 76 of file priorityqueue.cpp.

◆ getSizeByPos()

int PriorityQueue::getSizeByPos ( ) const

Definition at line 307 of file priorityqueue.cpp.

◆ insert()

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

Definition at line 116 of file priorityqueue.cpp.

◆ isIn()

bool PriorityQueue::isIn ( int  key) const

Definition at line 106 of file priorityqueue.cpp.

◆ operator=()

PriorityQueue & pal::PriorityQueue::operator= ( const PriorityQueue )
delete

PriorityQueue cannot be copied.

◆ print()

void PriorityQueue::print ( )

Definition at line 291 of file priorityqueue.cpp.

◆ remove()

void PriorityQueue::remove ( int  key)

Definition at line 134 of file priorityqueue.cpp.

◆ setPriority()

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

Definition at line 252 of file priorityqueue.cpp.

◆ sort()

void PriorityQueue::sort ( )

Definition at line 154 of file priorityqueue.cpp.

◆ upheap()

void PriorityQueue::upheap ( int  key)

Definition at line 168 of file priorityqueue.cpp.


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