eg_exutil.c File Reference


Detailed Description

Definition in file eg_exutil.c.

#include "eg_exutil.h"

Include dependency graph for eg_exutil.c:

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.
static mpq_t cvl
 rational remainder used in the continued fraction method
static mpz_t Z [7]
 Array of integers used in the continued fraction method.

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