18 |
|
return 0; |
19 |
|
for(i=hp->size;i<sz;i++) { |
20 |
|
hp->heap[i].entity = NULL; |
21 |
< |
hp->heap[i].key = -HUGE; |
21 |
> |
hp->heap[i].key = -FHUGE; |
22 |
|
} |
23 |
|
hp->cap = sz; |
24 |
|
if (sz < hp->size) { |
119 |
|
{ |
120 |
|
heapElem res; |
121 |
|
if (hp->size < 1) { |
122 |
< |
res.key = -HUGE; |
122 |
> |
res.key = -FHUGE; |
123 |
|
res.entity = NULL; |
124 |
|
return res; |
125 |
|
} |
154 |
|
} |
155 |
|
} |
156 |
|
hp->heap[hp->size].entity = entity; |
157 |
< |
hp->heap[hp->size].key = -HUGE; |
157 |
> |
hp->heap[hp->size].key = -FHUGE; |
158 |
|
hp->size++; |
159 |
|
return inc_key(hp,(hp->size - 1),key); |
160 |
|
} |