/usr/include/qsopt_ex/lpdata_mpq.h is in libqsopt-ex-dev 2.5.10.3-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | /* WARNING! This file was autogenerated from template */
/****************************************************************************/
/* */
/* This file is part of QSopt_ex. */
/* */
/* (c) Copyright 2006 by David Applegate, William Cook, Sanjeeb Dash, */
/* and Daniel Espinoza */
/* */
/* Sanjeeb Dash ownership of copyright in QSopt_ex is derived from his */
/* copyright in QSopt. */
/* */
/* This code may be used under the terms of the GNU General Public License */
/* (Version 2.1 or later) as published by the Free Software Foundation. */
/* */
/* Alternatively, use is granted for research purposes only. */
/* */
/* It is your choice of which of these two licenses you are operating */
/* under. */
/* */
/* We make no guarantees about the correctness or usefulness of this code. */
/* */
/****************************************************************************/
/* RCSINFO $Id: lpdata_mpq.h,v 1.4 2003/11/05 17:00:56 meven Exp $ */
#ifndef mpq_ILL_LPDATA_H
#define mpq_ILL_LPDATA_H
#include "eg_lpnum.h"
#include "reporter.h"
#include "symtab.h"
#include "qstruct_mpq.h"
#include "readline_mpq.h"
#include "format_mpq.h"
#include "dstruct_mpq.h"
extern mpq_t mpq_ILL_MAXDOUBLE; /* 1e150 */
extern mpq_t mpq_ILL_MINDOUBLE; /* -1e150 */
#define mpq_ILL_MAXINT (2147483647) /* this is equal to 2^31-1 */
#define mpq_ILL_MIN (1) /* Must be same as QS_MIN */
#define mpq_ILL_MAX (-1) /* Must be same as QS_MAX */
/* Setting Alg in Presolve */
#define mpq_ILL_PRE_SCALE 1
#define mpq_ILL_PRE_FIXED 2
#define mpq_ILL_PRE_SINGLE_ROW 4
#define mpq_ILL_PRE_FORCING 8
#define mpq_ILL_PRE_SINGLE_COL 16
#define mpq_ILL_PRE_DUPLICATE_ROW 32
#define mpq_ILL_PRE_DUPLICATE_COL 64
#define mpq_ILL_PRE_EMPTY_COL 128
#define mpq_ILL_PRE_ALL (mpq_ILL_PRE_SCALE | mpq_ILL_PRE_FIXED | mpq_ILL_PRE_SINGLE_ROW \
mpq_ILL_PRE_FORCING | mpq_ILL_PRE_SINGLE_COL | mpq_ILL_PRE_DUPLICATE_ROW \
mpq_ILL_PRE_DUPLICATE_COL | mpq_ILL_PRE_EMPTY_COL)
#define mpq_ILL_PRE_SIMPLE (mpq_ILL_PRE_FIXED | mpq_ILL_PRE_EMPTY_COL)
typedef struct mpq_ILLlpdata
{ /* Complete LP data filled in by mpsread. */
int nrows;
int ncols;
int nstruct; /* Not including logicals. */
int nzcount;
int rowsize; /* Length of row arrays. */
int colsize; /* Length of col arrays. */
int structsize; /* Length of intmarker, structmap, */
/* colnames */
int objsense;
char *sense; /* Original sense, not after logicals. */
mpq_t *obj;
mpq_t *rhs;
mpq_t *rangeval;
mpq_t *lower;
mpq_t *upper;
mpq_ILLmatrix A; /* The coef matrix. */
struct mpq_ILLlp_rows *rA; /* Coef matrix in row form. */
char **rownames;
ILLsymboltab rowtab; /* contains rownames in no particular order */
char *objname; /* if colname is not NULL it is entered into
* the rowtab, see reader fcts in lp.c, mps.c*/
char **colnames; /* columns of struct variables */
ILLsymboltab coltab; /* contains colnames in no particular order */
char *probname;
char *intmarker;
int *structmap; /* Indices of structural variables */
int *rowmap; /* Indices of logical and range variables */
struct mpq_ILLlp_basis *basis;
struct mpq_ILLlp_predata *presolve;
struct mpq_ILLlp_sinfo *sinfo;
/**************************************************************************/
/* these fields are currently only set by mps.c reader fcts */
/**************************************************************************/
mpq_ILLmatrix sos; /* columns are the sets, rows are the
* problem's structural variables
* coefficients are the weights */
char *sos_type; /* type of each set */
int *is_sos_mem; /* for each structural variable contains
* -1 == not a set member
* i == member of sos set i
* where 0 <= i < sos.matcols */
char *refrowname; /* name of reference row */
int refind; /* index of reference row
* -1 if refrow was a free row
* and weights are found only in the
* sos matrix
* index >=0 if refrow is also a lp-row */
/**************************************************************************
* mpq_QSset_reporter initializes reporter
**************************************************************************/
qsstring_reporter reporter; /* used from within ILL fcts
* to report feedback */
}
mpq_ILLlpdata;
typedef struct mpq_ILLlp_basis
{
int nstruct;
int nrows;
int rownorms_size;
int colnorms_size;
char *cstat;
char *rstat;
mpq_t *rownorms;
mpq_t *colnorms;
}
mpq_ILLlp_basis;
typedef struct mpq_ILLlp_cache
{
int nstruct;
int nrows;
int status;
mpq_t val;
mpq_t *x;
mpq_t *pi;
mpq_t *rc;
mpq_t *slack;
}
mpq_ILLlp_cache;
typedef struct mpq_ILLlp_sinfo
{ /* LP info returned by presolve */
int ncols;
int nrows;
int nzcount;
int rowsize;
int colsize;
int objsense;
mpq_t *obj;
mpq_t *rhs;
mpq_t *lower;
mpq_t *upper;
mpq_ILLmatrix A;
char **colnames; /* Just for debugging - not updated */
}
mpq_ILLlp_sinfo;
typedef struct mpq_ILLlp_preline
{
mpq_t rhs;
mpq_t obj;
mpq_t lower;
mpq_t upper;
int count;
int *ind;
int row_or_col; /* 0 is row, 1 is col */
mpq_t *val;
}
mpq_ILLlp_preline;
typedef struct mpq_ILLlp_preop
{
int ptype;
int rowindex;
int colindex;
mpq_ILLlp_preline line;
}
mpq_ILLlp_preop;
typedef struct mpq_ILLlp_predata
{ /* Data needed in un-presolve. */
int opcount;
int opsize;
mpq_ILLlp_preop *oplist;
int r_nrows;
int r_ncols;
int *colmap;
int *rowmap;
mpq_t *rowscale;
mpq_t *colscale;
mpq_t *colfixval;
mpq_t *rowfixval;
}
mpq_ILLlp_predata;
typedef struct mpq_ILLlp_rows
{
int *rowbeg;
int *rowcnt;
int *rowind;
mpq_t *rowval;
}
mpq_ILLlp_rows;
/****************************************************************************/
/* */
/* lpdata.c */
/* */
/****************************************************************************/
struct mpq_qsdata *mpq_ILLread (
mpq_qsline_reader * file,
const char *fname,
int isMps);
void mpq_ILLstart (
void); /**< initialize mpq_ILL_MAXDOUBLE and other
constants, this funtion should be callef AFTER
EGlpNumStart() */
void mpq_ILLend (
void); /**< free any internal data asociated with variable
precision numbers */
void mpq_ILLchange_precision (
void); /**< This function re-compute the internal
variables precision to the (previously
set) EGLPNUM_PRECISION value (done with
EGlpNumSetPrecision) */
void mpq_ILLlpdata_init (
mpq_ILLlpdata * lp);
void mpq_ILLlpdata_free (
mpq_ILLlpdata * lp);
void mpq_ILLlp_basis_init (
mpq_ILLlp_basis * B);
void mpq_ILLlp_basis_free (
mpq_ILLlp_basis * B);
void mpq_ILLlp_cache_init (
mpq_ILLlp_cache * C);
void mpq_ILLlp_cache_free (
mpq_ILLlp_cache * C);
int mpq_ILLlp_basis_alloc (
mpq_ILLlp_basis * B,
int ncols,
int nrows);
int mpq_ILLlp_cache_alloc (
mpq_ILLlp_cache * C,
int ncols,
int nrows);
int mpq_ILLlp_rows_init (
mpq_ILLlp_rows * lp_rows,
mpq_ILLlpdata * lp,
int include_logicals);
void mpq_ILLlp_rows_clear (
mpq_ILLlp_rows * lp_rows);
int mpq_ILLprint_report (
mpq_ILLlpdata * lp,
const char *format,
...);
/* print to lp->reporter */
/****************************************************************************/
/* */
/* presolve.c */
/* */
/****************************************************************************/
void mpq_ILLlp_sinfo_init (
mpq_ILLlp_sinfo * sinfo),
mpq_ILLlp_sinfo_free (
mpq_ILLlp_sinfo * sinfo),
mpq_ILLlp_predata_init (
mpq_ILLlp_predata * pre),
mpq_ILLlp_predata_free (
mpq_ILLlp_predata * pre);
int mpq_ILLlp_add_logicals (
mpq_ILLlpdata * lp),
mpq_ILLlp_scale (
mpq_ILLlpdata * lp),
mpq_ILLlp_presolve (
mpq_ILLlpdata * lp,
int pre_types);
/* ========================================================================= */
/* if non-zero, then internal data has been initialized, and there is some
* memory allocated, if zero, no internal memory has been allocated
* (or it has been freed) */
extern int mpq___QSEX_SETUP;
#endif /* __ILL_LPDATA_H */
|