Wrap for the Boost Priority Queue class to be used in the FM algorithms. Ready to be used with FMCell and derived types. More...
#include <fmpriorityqueue.hpp>
Public Member Functions | |
FMPriorityQueue (const int &n) | |
Shorthand for heap element handle type. | |
void | setMaxSize (const int &n) |
Sets the maximum number of cells the heap will contain. | |
void | push (const cell_t *c) |
Pushes a new element into the heap. | |
void | increase (const cell_t *c) |
Priority queues do not allow key increasing. Therefore, it pushes the element again. This is done so that SFMM is implemented as FMM with this heap. | |
int | popMinIdx () |
Pops index of the element with lowest value and removes it from the heap. | |
size_t | size () const |
Returns current size of the heap. | |
void | clear () |
Deallocates heap memory. | |
bool | empty () const |
Returns true if the heap is empty. | |
Protected Attributes | |
boost::heap::priority_queue < const cell_t *, boost::heap::compare < FMCompare< cell_t > > > | heap_ |
The actual queue for FMCells. | |
Copyright (C) 2014 Javier V. Gomez and Jose Pardeiro www.javiervgomez.com
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition at line 27 of file fmpriorityqueue.hpp.