9 #ifndef CoinSimpFactorization_H 10 #define CoinSimpFactorization_H 32 FactorPointers(
int numRows,
int numCols,
int *UrowLengths_,
int *UcolLengths_);
38 friend void CoinSimpFactorizationUnitTest(
const std::string &mpsDir);
58 virtual void getAreas(
int numberRows,
65 virtual void preProcess();
73 virtual void postProcess(
const int *sequence,
int *pivotVariable);
75 virtual void makeNonSingular(
int *sequence,
int numberColumns);
80 virtual inline int numberElements()
const 83 return numberRows_ * (numberColumns_ + numberPivots_);
86 double maximumCoefficient()
const;
102 bool checkBeforeModifying =
false,
103 double acceptablePivot = 1.0e-8);
118 bool noPermute =
false);
124 bool noPermute =
false)
const;
129 bool noPermute =
false);
133 bool noPermute =
false,
bool save =
false)
const;
149 inline void clearArrays()
157 return reinterpret_cast< int *
>(elements_ + numberRows_ * numberRows_);
167 void gutsOfDestructor();
169 void gutsOfInitialize();
174 void factorize(
int numberOfRows,
176 const int colStarts[],
177 const int indicesRow[],
178 const double elements[]);
184 void copyUbyColumns();
186 int findPivot(
FactorPointers &pointers,
int &r,
int &s,
bool &ifSlack);
194 int findShortRow(
const int column,
const int length,
int &minRow,
197 int findShortColumn(
const int row,
const int length,
int &minCol,
202 void pivoting(
const int pivotRow,
const int pivotColumn,
205 void updateCurrentRow(
const int pivotRow,
const int row,
209 void increaseLsize();
211 void increaseRowSize(
const int row,
const int newSize);
213 void increaseColSize(
const int column,
const int newSize,
const bool b);
215 void enlargeUrow(
const int numNewElements);
217 void enlargeUcol(
const int numNewElements,
const bool b);
219 int findInRow(
const int row,
const int column);
221 int findInColumn(
const int column,
const int row);
223 void removeRowFromActSet(
const int row,
FactorPointers &pointers);
225 void removeColumnFromActSet(
const int column,
FactorPointers &pointers);
227 void allocateSpaceForU();
229 void allocateSomeArrays();
231 void initialSomeNumbers();
233 void Lxeqb(
double *b)
const;
235 void Lxeqb2(
double *b1,
double *b2)
const;
237 void Uxeqb(
double *b,
double *sol)
const;
239 void Uxeqb2(
double *b1,
double *sol1,
double *sol2,
double *b2)
const;
241 void xLeqb(
double *b)
const;
243 void xUeqb(
double *b,
double *sol)
const;
245 int LUupdate(
int newBasicCol);
247 void newEta(
int row,
int numNewElements);
249 void copyRowPermutations();
251 void Hxeqb(
double *b)
const;
253 void Hxeqb2(
double *b1,
double *b2)
const;
255 void xHeqb(
double *b)
const;
257 void ftran(
double *b,
double *sol,
bool save)
const;
259 void ftran2(
double *b1,
double *sol1,
double *b2,
double *sol2)
const;
261 void btran(
double *b,
double *sol)
const;
268 int checkPivot(
double saveFromU,
double oldPivot)
const;
273 double *denseVector_;
326 #ifdef COIN_SIMP_CAPACITY 327 int *UrowCapacities_;
351 #ifdef COIN_SIMP_CAPACITY 352 int *UcolCapacities_;
int lastColInU_
last column in U
int lastRowInU_
last row in U
int * EtaStarts_
Starts of eta vectors.
int pivotCandLimit_
maximum number of candidates for pivot
int * LrowInd_
indices in the rows of L
int * UcolLengths_
Lengths of the columns of U.
int * indices() const
Returns array to put basis indices in.
int * UrowLengths_
Lengths of the rows of U.
double maxGrowth_
bound on the growth rate
int minIncrease_
minimum storage increase
int UrowMaxCap_
maximum capacity of Urows
Abstract base class which also has some scalars so can be used from Dense or Simp.
int * LcolLengths_
Lengths of the columns of L.
int EtaSize_
number of elements in Eta_
int * UcolInd_
Indices in the columns of U.
pointers used during factorization
int maxEtaRows_
maximum number of eta vectors
double * workArea3_
work array
int UcolMaxCap_
maximum capacity of Ucolumns_
int firstRowInU_
first row in U
int * LrowLengths_
Lengths of the rows of L.
bool doSuhlHeuristic_
do Shul heuristic
int * LcolStarts_
Starts of the columns of L.
int * EtaInd_
columns of eta vectors
int * prevColInU_
previous column in U
int * secRowPosition_
position of row after permutation during LUupdate
int * UcolStarts_
Starts of the columns of U.
double updateTol_
maximum size for the diagonal of U after update
int UrowEnd_
number of used places in Urows
int * rowPosition_
position of row after permutation
int * LcolInd_
indices in the columns of L
FactorPointers(int numRows, int numCols, int *UrowLengths_, int *UcolLengths_)
double * workArea2_
work array
double * Eta_
elements of eta vectors
double * Lcolumns_
L by columns.
virtual int * permute() const
Returns permute in.
double * invOfPivots_
inverse values of the elements of diagonal of U
int * LrowStarts_
Starts of the rows of L.
int keepSize_
number of nonzeros
int * auxInd_
auxiliary vector
int numberSlacks_
number of slacks in basis
int EtaMaxCap_
Capacity of Eta_.
int firstNumberSlacks_
number of slacks in irst basis
int * prevRowInU_
previous row in U
int * EtaPosition_
position of Eta vector
int * colSlack_
indicator of slack variables
int * nextRowInU_
next row in U
int LrowSize_
Size of Lrows_;.
int * indKeep_
indices of this vector
int LcolSize_
numbers of elements in L
Sparse Matrix Base Class.
int * indVector_
array of indices
int * rowOfU_
permutations of rows
double * vecKeep_
vector to keep for LUupdate
int * nextColInU_
next column in U
int * colOfU_
permutation of columns
int * UrowStarts_
Starts of the rows of U.
int firstColInU_
first column in U
int * vecLabels_
array of labels (should be initialized to zero)
int LcolCap_
maximum capacity of L
int LrowCap_
Capacity of Lrows_.
int * EtaLengths_
Lengths of eta vectors.
int * secRowOfU_
permutations of rows during LUupdate
int * colPosition_
position of column after permutation
double * Lrows_
L by rows.
double * auxVector_
auxiliary vector
int UcolEnd_
last used position in Ucolumns_
int lastEtaRow_
last eta row
int * UrowInd_
Indices in the rows of U.