float128_dheaps_i.c File Reference

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

Include dependency graph for float128_dheaps_i.c:

Go to the source code of this file.

Defines

#define float128_HEAP_D   3
#define float128_HEAP_DOWN(x)   (((x)*float128_HEAP_D)+1)
#define float128_HEAP_UP(x)   (((x)-1)/float128_HEAP_D)

Functions

static int float128_dheap_minchild (int x, float128_ILLdheap *h)
static void float128_dheap_siftdown (float128_ILLdheap *h, int i, int x)
static void float128_dheap_siftup (float128_ILLdheap *h, int i, int x)
void float128_ILLutil_dheap_changekey (float128_ILLdheap *h, int i, float128 *newkey)
void float128_ILLutil_dheap_delete (float128_ILLdheap *h, int i)
void float128_ILLutil_dheap_deletemin (float128_ILLdheap *h, int *i)
void float128_ILLutil_dheap_findmin (float128_ILLdheap *h, int *i)
void float128_ILLutil_dheap_free (float128_ILLdheap *h)
int float128_ILLutil_dheap_init (float128_ILLdheap *h, int k)
int float128_ILLutil_dheap_insert (float128_ILLdheap *h, int i)
int float128_ILLutil_dheap_resize (float128_ILLdheap *h, int newsize)

Variables

static int TRACE = 0


Define Documentation

#define float128_HEAP_D   3

Definition at line 110 of file float128_dheaps_i.c.

Referenced by float128_dheap_minchild(), and float128_maxchild().

#define float128_HEAP_DOWN (  )     (((x)*float128_HEAP_D)+1)

Definition at line 112 of file float128_dheaps_i.c.

Referenced by float128_dheap_minchild().

#define float128_HEAP_UP (  )     (((x)-1)/float128_HEAP_D)

Definition at line 111 of file float128_dheaps_i.c.

Referenced by float128_dheap_siftup(), and float128_siftup().


Function Documentation

static int float128_dheap_minchild ( int  x,
float128_ILLdheap h 
) [static]

Definition at line 315 of file float128_dheaps_i.c.

References float128_ILLdheap::entry, float128_HEAP_D, float128_HEAP_DOWN, float128_ILLdheap::key, and float128_ILLdheap::size.

Referenced by float128_dheap_siftdown().

static void float128_dheap_siftdown ( float128_ILLdheap h,
int  i,
int  x 
)

Definition at line 295 of file float128_dheaps_i.c.

References float128_ILLdheap::entry, float128_dheap_minchild(), float128_ILLdheap::key, and float128_ILLdheap::loc.

Referenced by float128_ILLutil_dheap_changekey(), and float128_ILLutil_dheap_delete().

Here is the call graph for this function:

static void float128_dheap_siftup ( float128_ILLdheap h,
int  i,
int  x 
) [static]

Definition at line 276 of file float128_dheaps_i.c.

References float128_ILLdheap::entry, float128_HEAP_UP, float128_ILLdheap::key, and float128_ILLdheap::loc.

Referenced by float128_ILLutil_dheap_changekey(), float128_ILLutil_dheap_delete(), and float128_ILLutil_dheap_insert().

void float128_ILLutil_dheap_changekey ( float128_ILLdheap h,
int  i,
float128 *  newkey 
)

Definition at line 259 of file float128_dheaps_i.c.

References float128_dheap_siftdown(), float128_dheap_siftup(), float128_ILLdheap::key, and float128_ILLdheap::loc.

Here is the call graph for this function:

void float128_ILLutil_dheap_delete ( float128_ILLdheap h,
int  i 
)

Definition at line 220 of file float128_dheaps_i.c.

References float128_ILLdheap::entry, float128_dheap_siftdown(), float128_dheap_siftup(), float128_ILLdheap::key, float128_ILLdheap::loc, and float128_ILLdheap::size.

Here is the call graph for this function:

void float128_ILLutil_dheap_deletemin ( float128_ILLdheap h,
int *  i 
)

Definition at line 243 of file float128_dheaps_i.c.

References float128_ILLdheap::entry, float128_ILLutil_dheap_delete(), and float128_ILLdheap::size.

Referenced by float128_ILLutil_priority_deletemin().

Here is the call graph for this function:

void float128_ILLutil_dheap_findmin ( float128_ILLdheap h,
int *  i 
)

Definition at line 195 of file float128_dheaps_i.c.

References float128_ILLdheap::entry, and float128_ILLdheap::size.

void float128_ILLutil_dheap_free ( float128_ILLdheap h  ) 

Definition at line 157 of file float128_dheaps_i.c.

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

int float128_ILLutil_dheap_init ( float128_ILLdheap h,
int  k 
)

Definition at line 129 of file float128_dheaps_i.c.

References float128_ILLdheap::entry, float128_ILLutil_dheap_free(), ILL_RETURN, ILL_SAFE_MALLOC, float128_ILLdheap::key, float128_ILLdheap::loc, NULL, float128_ILLdheap::size, and float128_ILLdheap::total_space.

Here is the call graph for this function:

int float128_ILLutil_dheap_insert ( float128_ILLdheap h,
int  i 
)

Definition at line 205 of file float128_dheaps_i.c.

References float128_dheap_siftup(), float128_ILLdheap::size, and float128_ILLdheap::total_space.

Referenced by float128_ILLutil_priority_insert().

Here is the call graph for this function:

int float128_ILLutil_dheap_resize ( float128_ILLdheap h,
int  newsize 
)

Definition at line 166 of file float128_dheaps_i.c.

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


Variable Documentation

int TRACE = 0 [static]

Definition at line 108 of file float128_dheaps_i.c.


Generated on Thu Mar 29 09:35:40 2012 for QSopt_ex by  doxygen 1.4.7