mpf_dstruct.c File Reference

#include "config.h"
#include "mpf_iqsutil.h"
#include "mpf_dstruct.h"
#include "mpf_qsopt.h"
#include "mpf_lpdefs.h"

Include dependency graph for mpf_dstruct.c:

Go to the source code of this file.

Defines

#define mpf_DEBUG_HEAP   0
#define mpf_HEAP_D   3
#define mpf_HEAP_DOWN(x)   (((x)*mpf_HEAP_D)+1)
#define mpf_HEAP_UP(x)   (((x)-1)/mpf_HEAP_D)

Functions

int mpf_ILLheap_build (mpf_heap *const h, int const nelems, mpf_t *key)
void mpf_ILLheap_delete (mpf_heap *const h, int const ix)
int mpf_ILLheap_findmin (mpf_heap *const h)
void mpf_ILLheap_free (mpf_heap *const h)
void mpf_ILLheap_init (mpf_heap *const h)
void mpf_ILLheap_insert (mpf_heap *const h, int const ix)
void mpf_ILLheap_modify (mpf_heap *const h, int const ix)
void mpf_ILLmatrix_free (mpf_ILLmatrix *A)
void mpf_ILLmatrix_init (mpf_ILLmatrix *A)
void mpf_ILLmatrix_prt (EGioFile_t *fd, mpf_ILLmatrix *A)
int mpf_ILLsvector_alloc (mpf_svector *s, int nzcnt)
int mpf_ILLsvector_copy (const mpf_svector *s_in, mpf_svector *s_out)
void mpf_ILLsvector_free (mpf_svector *s)
void mpf_ILLsvector_init (mpf_svector *s)
static int mpf_maxchild (mpf_heap *h, int hloc)
static int mpf_siftdown (mpf_heap *h, int hloc, int ix)
static int mpf_siftup (mpf_heap *h, int hloc, int ix)

Variables

static int TRACE = 0


Define Documentation

#define mpf_DEBUG_HEAP   0

Definition at line 119 of file mpf_dstruct.c.

#define mpf_HEAP_D   3

Definition at line 121 of file mpf_dstruct.c.

#define mpf_HEAP_DOWN (  )     (((x)*mpf_HEAP_D)+1)

Definition at line 123 of file mpf_dstruct.c.

#define mpf_HEAP_UP (  )     (((x)-1)/mpf_HEAP_D)

Definition at line 122 of file mpf_dstruct.c.


Function Documentation

int mpf_ILLheap_build ( mpf_heap *const   h,
int const   nelems,
mpf_t *  key 
)

Definition at line 365 of file mpf_dstruct.c.

References mpf_heap::entry, mpf_heap::hexist, ILL_IFTRACE, ILL_IFTRACE2, ILL_RETURN, ILL_SAFE_MALLOC, mpf_heap::key, mpf_heap::loc, mpf_heap::maxsize, mpf_ILLheap_free(), mpf_siftdown(), and mpf_heap::size.

Referenced by mpf_ILLprice_build_heap().

Here is the call graph for this function:

void mpf_ILLheap_delete ( mpf_heap *const   h,
int const   ix 
)

Definition at line 309 of file mpf_dstruct.c.

References mpf_heap::entry, ILL_IFTRACE, mpf_heap::loc, mpf_siftdown(), mpf_siftup(), and mpf_heap::size.

Here is the call graph for this function:

int mpf_ILLheap_findmin ( mpf_heap *const   h  ) 

Definition at line 348 of file mpf_dstruct.c.

References mpf_heap::entry, mpf_heap::hexist, and mpf_heap::size.

void mpf_ILLheap_free ( mpf_heap *const   h  ) 

Definition at line 413 of file mpf_dstruct.c.

References mpf_heap::entry, mpf_heap::hexist, ILL_IFFREE, mpf_heap::loc, mpf_heap::maxsize, and mpf_heap::size.

Referenced by mpf_ILLheap_build(), and mpf_ILLprice_free_heap().

void mpf_ILLheap_init ( mpf_heap *const   h  ) 

Definition at line 356 of file mpf_dstruct.c.

References mpf_heap::entry, mpf_heap::hexist, mpf_heap::key, mpf_heap::loc, and NULL.

void mpf_ILLheap_insert ( mpf_heap *const   h,
int const   ix 
)

Definition at line 267 of file mpf_dstruct.c.

References ILL_IFTRACE, mpf_heap::key, mpf_siftup(), and mpf_heap::size.

Here is the call graph for this function:

void mpf_ILLheap_modify ( mpf_heap *const   h,
int const   ix 
)

Definition at line 286 of file mpf_dstruct.c.

References ILL_IFTRACE, mpf_heap::loc, mpf_siftdown(), and mpf_siftup().

Here is the call graph for this function:

void mpf_ILLmatrix_free ( mpf_ILLmatrix A  ) 

Definition at line 456 of file mpf_dstruct.c.

References ILL_IFFREE, mpf_ILLmatrix::matbeg, mpf_ILLmatrix::matcnt, mpf_ILLmatrix::matind, mpf_ILLmatrix::matval, and mpf_ILLmatrix_init().

Referenced by mpf_add_col(), mpf_add_row(), mpf_ILLlp_sinfo_free(), and mpf_ILLlpdata_free().

Here is the call graph for this function:

void mpf_ILLmatrix_init ( mpf_ILLmatrix A  ) 

Definition at line 439 of file mpf_dstruct.c.

References mpf_ILLmatrix::matbeg, mpf_ILLmatrix::matcnt, mpf_ILLmatrix::matcols, mpf_ILLmatrix::matcolsize, mpf_ILLmatrix::matfree, mpf_ILLmatrix::matind, mpf_ILLmatrix::matrows, mpf_ILLmatrix::matsize, and mpf_ILLmatrix::matval.

Referenced by mpf_add_col(), mpf_add_row(), mpf_ILLlp_sinfo_init(), mpf_ILLlpdata_init(), and mpf_ILLmatrix_free().

void mpf_ILLmatrix_prt ( EGioFile_t *  fd,
mpf_ILLmatrix A 
)

Definition at line 470 of file mpf_dstruct.c.

References mpf_ILLmatrix::matrows, and NULL.

Referenced by mpf_convert_rawlpdata_to_lpdata().

int mpf_ILLsvector_alloc ( mpf_svector s,
int  nzcnt 
)

Definition at line 63 of file mpf_dstruct.c.

References mpf_svector::coef, ILL_IFFREE, ILL_RETURN, ILL_SAFE_MALLOC, mpf_svector::indx, and mpf_svector::nzcnt.

int mpf_ILLsvector_copy ( const mpf_svector s_in,
mpf_svector s_out 
)

Definition at line 88 of file mpf_dstruct.c.

References mpf_svector::coef, ILL_CLEANUP_IF, ILL_RETURN, mpf_svector::indx, mpf_ILLsvector_alloc(), and mpf_svector::nzcnt.

Here is the call graph for this function:

void mpf_ILLsvector_free ( mpf_svector s  ) 

Definition at line 54 of file mpf_dstruct.c.

References mpf_svector::coef, ILL_IFFREE, mpf_svector::indx, and mpf_svector::nzcnt.

Referenced by mpf_free_internal_lpinfo(), mpf_ILLbasis_tableau_row(), mpf_ILLfactor_free_factor_work(), mpf_ILLprice_build_dsteep_norms(), mpf_ILLprice_build_psteep_norms(), mpf_ILLprice_get_dsteep_norms(), mpf_ILLprice_get_newnorms(), and mpf_ILLsimplex().

void mpf_ILLsvector_init ( mpf_svector s  ) 

Definition at line 46 of file mpf_dstruct.c.

References mpf_svector::coef, mpf_svector::indx, and mpf_svector::nzcnt.

static int mpf_maxchild ( mpf_heap h,
int  hloc 
)

Definition at line 191 of file mpf_dstruct.c.

References mpf_heap::entry, ILL_IFTRACE2, mpf_heap::key, mpf_HEAP_D, mpf_ILL_MINDOUBLE, and mpf_heap::size.

Referenced by mpf_siftdown().

static int mpf_siftdown ( mpf_heap h,
int  hloc,
int  ix 
)

Definition at line 163 of file mpf_dstruct.c.

References mpf_heap::entry, ILL_IFTRACE2, mpf_heap::key, mpf_heap::loc, and mpf_maxchild().

Referenced by mpf_ILLheap_build(), mpf_ILLheap_delete(), and mpf_ILLheap_modify().

Here is the call graph for this function:

static int mpf_siftup ( mpf_heap h,
int  hloc,
int  ix 
) [static]

Definition at line 137 of file mpf_dstruct.c.

References mpf_heap::entry, ILL_IFTRACE2, mpf_heap::key, mpf_heap::loc, and mpf_HEAP_UP.

Referenced by mpf_ILLheap_delete(), mpf_ILLheap_insert(), and mpf_ILLheap_modify().


Variable Documentation

int TRACE = 0 [static]

Definition at line 24 of file mpf_dstruct.c.


Generated on Thu Mar 29 09:41:45 2012 for QSopt_ex by  doxygen 1.4.7