mpq_dstruct.c File Reference

#include "config.h"
#include "mpq_iqsutil.h"
#include "mpq_dstruct.h"
#include "mpq_qsopt.h"
#include "mpq_lpdefs.h"

Include dependency graph for mpq_dstruct.c:

Go to the source code of this file.

Defines

#define mpq_DEBUG_HEAP   0
#define mpq_HEAP_D   3
#define mpq_HEAP_DOWN(x)   (((x)*mpq_HEAP_D)+1)
#define mpq_HEAP_UP(x)   (((x)-1)/mpq_HEAP_D)

Functions

int mpq_ILLheap_build (mpq_heap *const h, int const nelems, mpq_t *key)
void mpq_ILLheap_delete (mpq_heap *const h, int const ix)
int mpq_ILLheap_findmin (mpq_heap *const h)
void mpq_ILLheap_free (mpq_heap *const h)
void mpq_ILLheap_init (mpq_heap *const h)
void mpq_ILLheap_insert (mpq_heap *const h, int const ix)
void mpq_ILLheap_modify (mpq_heap *const h, int const ix)
void mpq_ILLmatrix_free (mpq_ILLmatrix *A)
void mpq_ILLmatrix_init (mpq_ILLmatrix *A)
void mpq_ILLmatrix_prt (EGioFile_t *fd, mpq_ILLmatrix *A)
int mpq_ILLsvector_alloc (mpq_svector *s, int nzcnt)
int mpq_ILLsvector_copy (const mpq_svector *s_in, mpq_svector *s_out)
void mpq_ILLsvector_free (mpq_svector *s)
void mpq_ILLsvector_init (mpq_svector *s)
static int mpq_maxchild (mpq_heap *h, int hloc)
static int mpq_siftdown (mpq_heap *h, int hloc, int ix)
static int mpq_siftup (mpq_heap *h, int hloc, int ix)

Variables

static int TRACE = 0


Define Documentation

#define mpq_DEBUG_HEAP   0

Definition at line 119 of file mpq_dstruct.c.

#define mpq_HEAP_D   3

Definition at line 121 of file mpq_dstruct.c.

#define mpq_HEAP_DOWN (  )     (((x)*mpq_HEAP_D)+1)

Definition at line 123 of file mpq_dstruct.c.

#define mpq_HEAP_UP (  )     (((x)-1)/mpq_HEAP_D)

Definition at line 122 of file mpq_dstruct.c.


Function Documentation

int mpq_ILLheap_build ( mpq_heap *const   h,
int const   nelems,
mpq_t *  key 
)

Definition at line 365 of file mpq_dstruct.c.

References mpq_heap::entry, mpq_heap::hexist, ILL_IFTRACE, ILL_IFTRACE2, ILL_RETURN, ILL_SAFE_MALLOC, mpq_heap::key, mpq_heap::loc, mpq_heap::maxsize, mpq_ILLheap_free(), mpq_siftdown(), and mpq_heap::size.

Referenced by mpq_ILLprice_build_heap().

Here is the call graph for this function:

void mpq_ILLheap_delete ( mpq_heap *const   h,
int const   ix 
)

Definition at line 309 of file mpq_dstruct.c.

References mpq_heap::entry, ILL_IFTRACE, mpq_heap::loc, mpq_siftdown(), mpq_siftup(), and mpq_heap::size.

Here is the call graph for this function:

int mpq_ILLheap_findmin ( mpq_heap *const   h  ) 

Definition at line 348 of file mpq_dstruct.c.

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

void mpq_ILLheap_free ( mpq_heap *const   h  ) 

Definition at line 413 of file mpq_dstruct.c.

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

Referenced by mpq_ILLheap_build(), and mpq_ILLprice_free_heap().

void mpq_ILLheap_init ( mpq_heap *const   h  ) 

Definition at line 356 of file mpq_dstruct.c.

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

void mpq_ILLheap_insert ( mpq_heap *const   h,
int const   ix 
)

Definition at line 267 of file mpq_dstruct.c.

References ILL_IFTRACE, mpq_heap::key, mpq_siftup(), and mpq_heap::size.

Here is the call graph for this function:

void mpq_ILLheap_modify ( mpq_heap *const   h,
int const   ix 
)

Definition at line 286 of file mpq_dstruct.c.

References ILL_IFTRACE, mpq_heap::loc, mpq_siftdown(), and mpq_siftup().

Here is the call graph for this function:

void mpq_ILLmatrix_free ( mpq_ILLmatrix A  ) 

Definition at line 456 of file mpq_dstruct.c.

References ILL_IFFREE, mpq_ILLmatrix::matbeg, mpq_ILLmatrix::matcnt, mpq_ILLmatrix::matind, mpq_ILLmatrix::matval, and mpq_ILLmatrix_init().

Referenced by mpq_add_col(), mpq_add_row(), mpq_ILLlp_sinfo_free(), and mpq_ILLlpdata_free().

Here is the call graph for this function:

void mpq_ILLmatrix_init ( mpq_ILLmatrix A  ) 

Definition at line 439 of file mpq_dstruct.c.

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

Referenced by mpq_add_col(), mpq_add_row(), mpq_ILLlp_sinfo_init(), mpq_ILLlpdata_init(), and mpq_ILLmatrix_free().

void mpq_ILLmatrix_prt ( EGioFile_t *  fd,
mpq_ILLmatrix A 
)

Definition at line 470 of file mpq_dstruct.c.

References mpq_ILLmatrix::matrows, and NULL.

Referenced by mpq_convert_rawlpdata_to_lpdata().

int mpq_ILLsvector_alloc ( mpq_svector s,
int  nzcnt 
)

Definition at line 63 of file mpq_dstruct.c.

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

int mpq_ILLsvector_copy ( const mpq_svector s_in,
mpq_svector s_out 
)

Definition at line 88 of file mpq_dstruct.c.

References mpq_svector::coef, ILL_CLEANUP_IF, ILL_RETURN, mpq_svector::indx, mpq_ILLsvector_alloc(), and mpq_svector::nzcnt.

Here is the call graph for this function:

void mpq_ILLsvector_free ( mpq_svector s  ) 

Definition at line 54 of file mpq_dstruct.c.

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

Referenced by mpq_free_internal_lpinfo(), mpq_ILLbasis_tableau_row(), mpq_ILLfactor_free_factor_work(), mpq_ILLprice_build_dsteep_norms(), mpq_ILLprice_build_psteep_norms(), mpq_ILLprice_get_dsteep_norms(), mpq_ILLprice_get_newnorms(), and mpq_ILLsimplex().

void mpq_ILLsvector_init ( mpq_svector s  ) 

Definition at line 46 of file mpq_dstruct.c.

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

static int mpq_maxchild ( mpq_heap h,
int  hloc 
)

Definition at line 191 of file mpq_dstruct.c.

References mpq_heap::entry, ILL_IFTRACE2, mpq_heap::key, mpq_HEAP_D, mpq_ILL_MINDOUBLE, and mpq_heap::size.

Referenced by mpq_siftdown().

static int mpq_siftdown ( mpq_heap h,
int  hloc,
int  ix 
)

Definition at line 163 of file mpq_dstruct.c.

References mpq_heap::entry, ILL_IFTRACE2, mpq_heap::key, mpq_heap::loc, and mpq_maxchild().

Referenced by mpq_ILLheap_build(), mpq_ILLheap_delete(), and mpq_ILLheap_modify().

Here is the call graph for this function:

static int mpq_siftup ( mpq_heap h,
int  hloc,
int  ix 
) [static]

Definition at line 137 of file mpq_dstruct.c.

References mpq_heap::entry, ILL_IFTRACE2, mpq_heap::key, mpq_heap::loc, and mpq_HEAP_UP.

Referenced by mpq_ILLheap_delete(), mpq_ILLheap_insert(), and mpq_ILLheap_modify().


Variable Documentation

int TRACE = 0 [static]

Definition at line 24 of file mpq_dstruct.c.


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