#include "priorityq-heap.h"
#include "geom.h"
Go to the source code of this file.
◆ FALSE
◆ INIT_SIZE
◆ LEQ
◆ TRUE
◆ FloatDown()
Definition at line 96 of file priorityq-heap.c.
97{
102
103 hCurr =
n[curr].handle;
104 for( ;; ) {
109 }
110
112
115 n[curr].handle = hCurr;
116 h[hCurr].node = curr;
117 break;
118 }
122 }
123}
GLfloat GLfloat GLfloat GLfloat h
Referenced by pqDelete(), pqExtractMin(), and pqInit().
◆ FloatUp()
Definition at line 126 of file priorityq-heap.c.
127{
132
133 hCurr =
n[curr].handle;
134 for( ;; ) {
138 n[curr].handle = hCurr;
139 h[hCurr].node = curr;
140 break;
141 }
142 n[curr].handle = hParent;
143 h[hParent].node = curr;
145 }
146}
Referenced by pqDelete(), and pqInsert().
◆ pqDelete()
Definition at line 234 of file priorityq-heap.c.
235{
238 long curr;
239
241
242 curr =
h[hCurr].node;
243 n[curr].handle =
n[pq->
size].handle;
244 h[
n[curr].handle].node = curr;
245
246 if( curr <= -- pq->
size ) {
249 } else {
251 }
252 }
256}
static void FloatDown(PriorityQ *pq, long curr)
static void FloatUp(PriorityQ *pq, long curr)
◆ pqDeletePriorityQ()
◆ pqExtractMin()
Definition at line 211 of file priorityq-heap.c.
212{
217
219 n[1].handle =
n[pq->
size].handle;
220 h[
n[1].handle].node = 1;
221
225
226 if( -- pq->
size > 0 ) {
228 }
229 }
231}
◆ pqInit()
Definition at line 149 of file priorityq-heap.c.
150{
152
153
154
155 for(
i = pq->
size;
i >= 1; --
i ) {
157 }
159}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
◆ pqInsert()
Definition at line 163 of file priorityq-heap.c.
164{
165 long curr;
167
169 if( (curr*2) > pq->
max ) {
172
173
176 (size_t)
177 ((pq->
max + 1) *
sizeof( pq->
nodes[0] )));
179 pq->
nodes = saveNodes;
181 }
183 (size_t)
189 }
190 }
191
194 } else {
197 }
198
202
205 }
208}
BOOL free_handle(HINTERNET hinternet)
◆ pqNewPriorityQ()
Definition at line 58 of file priorityq-heap.c.
59{
62
69 }
70
76 }
77
81
84 return pq;
85}
int(* leq)(PQkey key1, PQkey key2)