2
Copyright (C) 2003-2006 Tommi Junttila
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License version 2
6
as published by the Free Software Foundation.
8
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
GNU General Public License for more details.
13
You should have received a copy of the GNU General Public License
14
along with this program; if not, write to the Free Software
15
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
18
/* FSF address fixed in the above notice on 1 Oct 2009 by Tamas Nepusz */
27
#if defined(CONSISTENCY_CHECKS)
32
void upheap(unsigned int k);
33
void downheap(unsigned int k);
35
Heap() {array = 0; n = 0; }
37
void init(unsigned int size);
39
bool is_empty() const {return(n==0); }
41
void insert(unsigned int v);
42
unsigned int remove();