21 #ifndef Minisat_Heap_h
22 #define Minisat_Heap_h
39 static inline int left (
int i) {
return i*2+1; }
40 static inline int right (
int i) {
return (i+1)*2; }
41 static inline int parent(
int i) {
return (i-1) >> 1; }
49 while (i != 0 &&
lt(x,
heap[p])){
65 if (!
lt(
heap[child], x))
break;
129 for (i = 0; i < ns.
size(); i++){
133 for (i =
heap.
size() / 2 - 1; i >= 0; i--)
139 for (
int i = 0; i <
heap.
size(); i++)
void build(vec< int > &ns)
void percolateDown(int i)
void clear(bool dealloc=false)
int operator[](int index) const
void clear(bool dealloc=false)
const T & last(void) const