bprioqueue.h File Reference

bounded priority queue. More...

#include "abacus/bheap.h"
#include "abacus/bprioqueue.inc"

Go to the source code of this file.

Classes

class  ABA_BPRIOQUEUE< Type, Key >
 Since the priority queue is implemented by a heap (class ABA_BHEAP) the insertion of a new element and the deletion of the minimal element require $\hbox{\rm O}(\log n)$ time if $n$ elements are stored in the priority queue. More...


Detailed Description

bounded priority queue.

Author:
Matthias Elf
A priority queue is a data structure storing a set of elements. Each element has a key which must be an ordered data type. The most important operations are the insertion of an element, the determination of the element having the minimal key, and the deletion of the element having minimal key.

Since the priority queue is implemented by a heap (class ABA_BHEAP) the insertion of a new element and the deletion of the minimal element require $\hbox{\rm O}(\log n)$ time if $n$ elements are stored in the priority queue. The element having minimal key can be determined in constant time.
To provide an efficient implementation the priority queue is bounded, i.e., the maximal number of elements is an argument of the constructor. However, if required, later a reallocation can be performed.
License:
This file is part of ABACUS - A Branch And CUt System Copyright (C) 1995 - 2003 University of Cologne, Germany
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
See also:
http://www.gnu.org/copyleft/gpl.html

Definition in file bprioqueue.h.


Generated on Tue Aug 14 18:09:54 2007 for ABACUS by  doxygen 1.5.1