dheaps_i.c File Reference

#include "qs_config.h"
#include "dheaps_i.h"
#include "allocrus.h"
#include "machdefs.h"
#include "except.h"
#include "trace.h"

Include dependency graph for dheaps_i.c:

Go to the source code of this file.

Defines

#define HEAP_D   3
#define HEAP_DOWN(x)   (((x)*HEAP_D)+1)
#define HEAP_UP(x)   (((x)-1)/HEAP_D)

Functions

static int dheap_minchild (int x, ILLdheap *h)
static void dheap_siftdown (ILLdheap *h, int i, int x)
static void dheap_siftup (ILLdheap *h, int i, int x)
void ILLutil_dheap_changekey (ILLdheap *h, int i, EGlpNum_t *newkey)
void ILLutil_dheap_delete (ILLdheap *h, int i)
void ILLutil_dheap_deletemin (ILLdheap *h, int *i)
void ILLutil_dheap_findmin (ILLdheap *h, int *i)
void ILLutil_dheap_free (ILLdheap *h)
int ILLutil_dheap_init (ILLdheap *h, int k)
int ILLutil_dheap_insert (ILLdheap *h, int i)
int ILLutil_dheap_resize (ILLdheap *h, int newsize)

Variables

static int TRACE = 0


Define Documentation

#define HEAP_D   3

Definition at line 110 of file dheaps_i.c.

Referenced by dheap_minchild(), and maxchild().

#define HEAP_DOWN (  )     (((x)*HEAP_D)+1)

Definition at line 112 of file dheaps_i.c.

Referenced by dheap_minchild().

#define HEAP_UP (  )     (((x)-1)/HEAP_D)

Definition at line 111 of file dheaps_i.c.

Referenced by dheap_siftup(), and siftup().


Function Documentation

static int dheap_minchild ( int  x,
ILLdheap h 
) [static]

Definition at line 315 of file dheaps_i.c.

References ILLdheap::entry, HEAP_D, HEAP_DOWN, ILLdheap::key, and ILLdheap::size.

Referenced by dheap_siftdown().

static void dheap_siftdown ( ILLdheap h,
int  i,
int  x 
)

Definition at line 295 of file dheaps_i.c.

References dheap_minchild(), ILLdheap::entry, ILLdheap::key, and ILLdheap::loc.

Referenced by ILLutil_dheap_changekey(), and ILLutil_dheap_delete().

Here is the call graph for this function:

static void dheap_siftup ( ILLdheap h,
int  i,
int  x 
) [static]

Definition at line 276 of file dheaps_i.c.

References ILLdheap::entry, HEAP_UP, ILLdheap::key, and ILLdheap::loc.

Referenced by ILLutil_dheap_changekey(), ILLutil_dheap_delete(), and ILLutil_dheap_insert().

void ILLutil_dheap_changekey ( ILLdheap h,
int  i,
EGlpNum_t *  newkey 
)

Definition at line 259 of file dheaps_i.c.

References dheap_siftdown(), dheap_siftup(), ILLdheap::key, and ILLdheap::loc.

Referenced by ILLutil_priority_changekey().

Here is the call graph for this function:

void ILLutil_dheap_delete ( ILLdheap h,
int  i 
)

Definition at line 220 of file dheaps_i.c.

References dheap_siftdown(), dheap_siftup(), ILLdheap::entry, ILLdheap::key, ILLdheap::loc, and ILLdheap::size.

Referenced by ILLutil_dheap_deletemin(), and ILLutil_priority_delete().

Here is the call graph for this function:

void ILLutil_dheap_deletemin ( ILLdheap h,
int *  i 
)

Definition at line 243 of file dheaps_i.c.

References ILLdheap::entry, ILLutil_dheap_delete(), and ILLdheap::size.

Referenced by ILLutil_priority_deletemin().

Here is the call graph for this function:

void ILLutil_dheap_findmin ( ILLdheap h,
int *  i 
)

Definition at line 195 of file dheaps_i.c.

References ILLdheap::entry, and ILLdheap::size.

Referenced by ILLutil_priority_findmin().

void ILLutil_dheap_free ( ILLdheap h  ) 

Definition at line 157 of file dheaps_i.c.

References ILLdheap::entry, ILL_IFFREE, ILLdheap::key, and ILLdheap::loc.

Referenced by ILLutil_dheap_init(), and ILLutil_priority_free().

int ILLutil_dheap_init ( ILLdheap h,
int  k 
)

Definition at line 129 of file dheaps_i.c.

References ILLdheap::entry, ILL_RETURN, ILL_SAFE_MALLOC, ILLutil_dheap_free(), ILLdheap::key, ILLdheap::loc, NULL, ILLdheap::size, and ILLdheap::total_space.

Referenced by ILLutil_priority_init().

Here is the call graph for this function:

int ILLutil_dheap_insert ( ILLdheap h,
int  i 
)

Definition at line 205 of file dheaps_i.c.

References dheap_siftup(), ILLdheap::size, and ILLdheap::total_space.

Referenced by ILLutil_priority_insert().

Here is the call graph for this function:

int ILLutil_dheap_resize ( ILLdheap h,
int  newsize 
)

Definition at line 166 of file dheaps_i.c.

References ILLdheap::entry, ILL_CLEANUP, ILL_RETURN, ILLdheap::key, ILLdheap::loc, and ILLdheap::total_space.

Referenced by ILLutil_priority_insert().


Variable Documentation

int TRACE = 0 [static]

Definition at line 108 of file dheaps_i.c.


Generated on Thu Mar 29 09:34:59 2012 for QSopt_ex by  doxygen 1.4.7