factor.h

Go to the documentation of this file.
00001 /****************************************************************************/
00002 /*                                                                          */
00003 /*  This file is part of QSopt_ex.                                          */
00004 /*                                                                          */
00005 /*  (c) Copyright 2006 by David Applegate, William Cook, Sanjeeb Dash,      */
00006 /*  and Daniel Espinoza                                                     */
00007 /*                                                                          */
00008 /*  Sanjeeb Dash ownership of copyright in QSopt_ex is derived from his     */
00009 /*  copyright in QSopt.                                                     */
00010 /*                                                                          */
00011 /*  This code may be used under the terms of the GNU General Public License */
00012 /*  (Version 2.1 or later) as published by the Free Software Foundation.    */
00013 /*                                                                          */
00014 /*  Alternatively, use is granted for research purposes only.               */
00015 /*                                                                          */
00016 /*  It is your choice of which of these two licenses you are operating      */
00017 /*  under.                                                                  */
00018 /*                                                                          */
00019 /*  We make no guarantees about the correctness or usefulness of this code. */
00020 /*                                                                          */
00021 /****************************************************************************/
00022 
00023 /* RCSINFO $Id: factor.h,v 1.3 2003/11/05 16:57:39 meven Exp $ */
00024 #ifndef __QS_FACTOR_H_
00025 #define __QS_FACTOR_H_
00026 #include "basicdefs.h"
00027 #include "qs_config.h"
00028 #include "dstruct.h"
00029 
00030 typedef char QSbool;
00031 
00032 typedef struct uc_info
00033 {
00034   int cbeg;
00035   int nzcnt;
00036   int next;
00037   int prev;
00038   int delay;
00039 }
00040 uc_info;
00041 
00042 typedef struct ur_info
00043 {
00044   EGlpNum_t max;
00045   int rbeg;
00046   int nzcnt;
00047   int pivcnt;
00048   int next;
00049   int prev;
00050   int delay;
00051 }
00052 ur_info;
00053 
00054 typedef struct lc_info
00055 {
00056   int cbeg;
00057   int nzcnt;
00058   int c;
00059   int crank;
00060   int delay;
00061 }
00062 lc_info;
00063 
00064 typedef struct lr_info
00065 {
00066   int rbeg;
00067   int nzcnt;
00068   int r;
00069   int rrank;
00070   int delay;
00071 }
00072 lr_info;
00073 
00074 typedef struct er_info
00075 {
00076   int rbeg;
00077   int nzcnt;
00078   int r;
00079 }
00080 er_info;
00081 
00082 typedef struct factor_work
00083 {
00084   int max_k;
00085   EGlpNum_t fzero_tol;
00086   EGlpNum_t szero_tol;
00087   EGlpNum_t partial_tol;
00088   double ur_space_mul;
00089   double uc_space_mul;
00090   double lc_space_mul;
00091   double lr_space_mul;
00092   double er_space_mul;
00093   double grow_mul;
00094   int p;
00095   int etamax;
00096   double minmult;
00097   double maxmult;
00098   double updmaxmult;
00099   double dense_fract;
00100   int dense_min;
00101 
00102   EGlpNum_t maxelem_orig;
00103   int nzcnt_orig;
00104   EGlpNum_t maxelem_factor;
00105   int nzcnt_factor;
00106   EGlpNum_t maxelem_cur;
00107   int nzcnt_cur;
00108 
00109   EGlpNum_t partial_cur;
00110 
00111   int dim;
00112   int stage;
00113   int nstages;
00114   int etacnt;
00115   EGlpNum_t *work_coef;
00116   int *work_indx;
00117   uc_info *uc_inf;
00118   ur_info *ur_inf;
00119   lc_info *lc_inf;
00120   lr_info *lr_inf;
00121   er_info *er_inf;
00122   int *ucindx;                  /* row index for column data */
00123   int *ucrind;                  /* index of column in row data */
00124   EGlpNum_t *uccoef;            /* coefficient for column data */
00125   int *urindx;                  /* col index for row data */
00126   int *urcind;                  /* index of row in column data */
00127   EGlpNum_t *urcoef;            /* coefficient for row data */
00128   int *lcindx;                  /* row index for L data */
00129   EGlpNum_t *lccoef;            /* coefficient for L row data */
00130   int *lrindx;                  /* col index for L data */
00131   EGlpNum_t *lrcoef;            /* coefficient for L col data */
00132   int *erindx;                  /* col index for eta data */
00133   EGlpNum_t *ercoef;            /* coefficient for eta data */
00134   int *rperm;
00135   int *rrank;
00136   int *cperm;
00137   int *crank;
00138   svector xtmp;
00139   int ur_freebeg;
00140   int ur_space;
00141   int uc_freebeg;
00142   int uc_space;
00143   int lc_freebeg;
00144   int lc_space;
00145   int lr_freebeg;
00146   int lr_space;
00147   int er_freebeg;
00148   int er_space;
00149 
00150   int *p_nsing;
00151   int **p_singr;
00152   int **p_singc;
00153 
00154   EGlpNum_t *dmat;
00155   int drows;
00156   int dcols;
00157   int dense_base;
00158 }
00159 factor_work;
00160 
00161 void ILLfactor_init_factor_work (
00162   factor_work * f),
00163   ILLfactor_free_factor_work (
00164   factor_work * f),
00165   ILLfactor_ftran (
00166   factor_work * f,
00167   svector * a,
00168   svector * x),
00169   ILLfactor_ftran_update (
00170   factor_work * f,
00171   svector * a,
00172   svector * upd,
00173   svector * x),
00174   ILLfactor_btran (
00175   factor_work * f,
00176   svector * a,
00177   svector * x);
00178 
00179 int ILLfactor_create_factor_work (
00180   factor_work * f,
00181   int dim),
00182   ILLfactor_set_factor_iparam (
00183   factor_work * f,
00184   int param,
00185   int val),
00186   ILLfactor_set_factor_dparam (
00187   factor_work * f,
00188   int param,
00189   EGlpNum_t val),
00190   ILLfactor (
00191   factor_work * f,
00192   int *basis,
00193   int *cbeg,
00194   int *clen,
00195   int *cindx,
00196   EGlpNum_t * ccoef,
00197   int *p_nsing,
00198   int **p_singr,
00199   int **p_singc),
00200   ILLfactor_update (
00201   factor_work * f,
00202   svector * a,
00203   int col,
00204   int *p_refact);
00205 
00206 #endif /* __QS_FACTOR_H_ */

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