eg_exutil.h File Reference


Detailed Description

Definition in file eg_exutil.h.

#include "qs_config.h"
#include "mpq_qstruct.h"
#include "mpq_lpdata.h"

Include dependency graph for eg_exutil.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

EXutilStatics

Variables asociated with the EXutilApproximate function, we use them as static to save some time in intialization

void EXutilDoClear (void)
 Clear all memory related to the static variables.
void EXutilDoInit (void)
 Initialize the static variables at start-up.

Defines

#define EX_STATUS_BESTFRAC   128U
 status for integer variable among our set of selected integer variables. This status is not defined while calling cut callbacks.
#define EX_STATUS_FIX_LB   64U
 status for integer variable fixed at its lower bound. This status is not defined while calling cut callbacks.
#define EX_STATUS_FIX_UB   32U
 status for integer variable fixed at its upper bound. This status is not defined while calling cut callbacks.
#define EX_STATUS_INT   4U
 status for variables that are integer
#define EX_STATUS_LB   8U
 status for variables that bounded from below
#define EX_STATUS_LGC   1U
 status for variables that are logicals
#define EX_STATUS_STR   2U
 status for variables that are structural
#define EX_STATUS_UB   16U
 status for variables that bounded from above
#define EX_UTIL_VERBOSE   100
 verbosity level
#define EXutilIidToStr(iid, QSlp, QSinv_map)
 given a variable in internal number, return a pointer to its name.
#define EXutilInnProd(dim, a, b, v, w, rop)
 given two vectors (a,b) and (v,w), compute its inner product and store it into rop.
#define EXutilL1Norm(dim, a, rop)
 Compute the L_1 norm of a given vector.
#define EXutilNzSz(dim, a, rop)
 Compute the number of non-zeros in a given vector.
#define mpq_CroundExp(op, exp)
 round to $+\infty$ the given number to the closest fraction of the form $a/2^{exp}$ from above.
#define mpq_FracPart(rop, op1)
 asign to the first number the fractional part of the second, i.e. $ rop = op1 - \lfloor op1 \rfloor $.
#define mpq_FroundExp(op, exp)
 round to $-\infty$ the given number to the closest fraction of the form $a/2^{exp}$ from bellow.
#define mpq_IsInteger(op)
 test if the given number is integer.
#define mpq_TroundExp(op, exp)
 round to $0$ the given number to the closest fraction of the form $a/2^{exp}$ towards zero.

Functions

void EXutilApproximate (mpq_t dest, mpq_t ori, unsigned const max_den)
 Approximate using continued fractions method a given rational $\frac{a}{b} $ with another rational $\frac{a'}{b'}$ that satisfy that $ b' < max_den^2 $ and also $|\frac{a}{b} - \frac{a'}{b'}|\leq\frac1{max_den^2}$.
int EXutilExpandLogicals (mpq_QSdata *const act_lp, mpq_t *const vector, mpq_t rhs, mpq_ILLlp_rows *const lprows)
 Given a vector in QSopt external form, and a row description of the related LP, re-write the vector using only real variables, we do that by substracting the equation defining the logical variable multiplied by the coefficient of the logical variable in the vector to the vector.
int EXutilIntegralize (const unsigned n, mpq_t *const a, mpq_t b, mpq_t maxabs)
 given a cut ax <=> b, write it in integer form ,i.e. set all a,b to integer in such a way that a_i and b are all relativelly prime.
void EXutilNicefy (mpq_QSdata *const act_prob, const unsigned char *const var_stat, const unsigned max_den, mpq_t *a, mpq_t b, int const sense)
 Given an inequality, we try to re-write so that no denominator is bigger than the square of the given number, and ensuring validity. for coefficients that can't be `nacified' we leave them intact. the process imply adding multiples of the bounds on variables, and at the end, nicify the rhs of the inequality.
void EXutilOverEstimate (mpq_t dest, mpq_t ori, unsigned const max_den)
 Overestimate the given coefficient by another rational that is representble with denominators not bigger than max_den^2.
int EXutilSimplify (const unsigned n, mpq_t *const a, mpq_t b)
 given a cut ax <=> b, write it in normalized form ,i.e. set all a,b to integer in such a way that a_i and b are all relativelly prime, and divide them all over the maximum such (a_i,b) (so that the infinity norm of (a,b) is one.
void mpq_GomoryCoeff (mpq_t rop, mpq_t coef, unsigned const is_int, int const bound, unsigned const cut_mlt, mpq_t b_frac)
 compute the gomory coefficient of the variable given the original coefficient, the multiplier, and all relevant information.


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