SoPlex Documentation
Loading...
Searching...
No Matches
clufactor.h
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the class library */
4/* SoPlex --- the Sequential object-oriented simPlex. */
5/* */
6/* Copyright (c) 1996-2023 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SoPlex; see the file LICENSE. If not email to soplex@zib.de. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file clufactor.h
26 * @brief Implementation of sparse LU factorization.
27 */
28#ifndef _CLUFACTOR_H_
29#define _CLUFACTOR_H_
30
31#include "soplex/spxdefines.h"
32#include "soplex/slinsolver.h"
33#include "soplex/timer.h"
34#include "soplex/svector.h"
35
36#include "vector"
37
38#define WITH_L_ROWS 1
39
40namespace soplex
41{
42/**@brief Implementation of sparse LU factorization.
43 * @ingroup Algo
44 *
45 * This class implements a sparse LU factorization with either
46 * FOREST-TOMLIN or ETA updates, using dynamic Markowitz pivoting.
47 */
48template <class R>
50{
51public:
52
53 //----------------------------------------
54 /**@name Public types */
55 ///@{
56 /** Doubly linked ring structure for garbage collection of column or
57 * row file in working matrix.
58 */
59 struct Dring
60 {
63 int idx;
64 };
65
66 /// Pivot Ring
67 class Pring
68 {
69 public:
70 Pring* next; ///<
71 Pring* prev; ///<
72 int idx; ///< index of pivot row
73 int pos; ///< position of pivot column in row
74 int mkwtz; ///< markowitz number of pivot
75
76 Pring() : next(0), prev(0) ///< constructor
77 {
78 mkwtz = -1;
79 idx = -1;
80 pos = -1;
81 }
82
83 private:
84 Pring(const Pring&); ///< blocked copy constructor
85 Pring& operator= (const Pring&); ///< blocked assignment operator
86 };
87 ///@}
88
89protected:
90
91 //----------------------------------------
92 /**@name Protected types */
93 ///@{
94 /// Temporary data structures.
95 class Temp
96 {
97 public:
98 int* s_mark; ///< marker
99 std::vector<R> s_max; ///< maximum absolute value per row (or -1)
100 int* s_cact; ///< lengths of columns of active submatrix
101 int stage; ///< stage of the structure
102 Pring pivots; ///< ring of selected pivot rows
103 Pring* pivot_col; ///< column index handlers for R linked list
104 Pring* pivot_colNZ; ///< lists for columns to number of nonzeros
105 Pring* pivot_row; ///< row index handlers for R linked list
106 Pring* pivot_rowNZ; ///< lists for rows to number of nonzeros
107
108 Temp(); ///< constructor
109 ~Temp(); ///< destructor
110 void init(int p_dim); ///< initialization
111 void clear(); ///< clears the structure
112
113 private:
114 Temp(const Temp&); ///< blocked copy constructor
115 Temp& operator= (const Temp&); ///< blocked assignment operator
116 };
117
118 /// Data structures for saving the row and column permutations.
119 struct Perm
120 {
121 int* orig; ///< orig[p] original index from p
122 int* perm; ///< perm[i] permuted index from i
123 };
124
125 /// Data structures for saving the working matrix and U factor.
126 struct U
127 {
128 ///
129 struct Row
130 {
131 Dring list; /*!< \brief Double linked ringlist of VectorBase<R>
132 indices in the order they appear
133 in the row file */
134 Dring* elem; ///< %Array of ring elements.
135 int size; ///< size of arrays val and idx
136 int used; ///< used entries of arrays idx and val
137 std::vector<R> val; ///< hold nonzero values
138 int* idx; ///< hold column indices of nonzeros
139 int* start; ///< starting positions in val and idx
140 int* len; ///< used nonzeros per row vectors
141 int* max; /*!< \brief maximum available nonzeros per row:
142 start[i] + max[i] == start[elem[i].next->idx]
143 len[i] <= max[i]. */
145
146 ///
147 struct Col
148 {
149 Dring list; /*!< \brief Double linked ringlist of VectorBase<R>
150 indices in the order they appear
151 in the column file */
152 Dring* elem; ///< %Array of ring elements.
153 int size; ///< size of array idx
154 int used; ///< used entries of array idx
155 int* idx; ///< hold row indices of nonzeros
156 std::vector<R> val; /*!< \brief hold nonzero values: this is only initialized
157 in the end of the factorization with DEFAULT
158 updates. */
159 int* start; ///< starting positions in val and idx
160 int* len; ///< used nonzeros per column vector
161 int* max; /*!< \brief maximum available nonzeros per colunn:
162 start[i] + max[i] == start[elem[i].next->idx]
163 len[i] <= max[i]. */
165 };
166
167
168 /// Data structures for saving the working matrix and L factor.
169 struct L
170 {
171 int size; ///< size of arrays val and idx
172 std::vector<R> val; ///< values of L vectors
173 int* idx; ///< indices of L vectors
174 int startSize; ///< size of array start
175 int firstUpdate; ///< number of first update L vector
176 int firstUnused; ///< number of first unused L vector
177 int* start; ///< starting positions in val and idx
178 int* row; ///< column indices of L vectors
179 int updateType; ///< type of updates to be used.
180
181 /* The following arrays have length |firstUpdate|, since they keep
182 * rows of the L-vectors occuring during the factorization (without
183 * updates), only:
184 */
185 std::vector<R> rval; ///< values of rows of L
186 int* ridx; ///< indices of rows of L
187 int* rbeg; ///< start of rows in rval and ridx
188 int* rorig; ///< original row permutation
189 int* rperm; ///< original row permutation
190 };
191 ///@}
192
193 //----------------------------------------
194 /**@name Protected data */
195 ///@{
196 typename SLinSolver<R>::Status stat; ///< Status indicator.
197
198 int thedim; ///< dimension of factorized matrix
199 int nzCnt; ///< number of nonzeros in U
200 R initMaxabs; ///< maximum abs number in initail Matrix
201 R maxabs; ///< maximum abs number in L and U
202
203 R rowMemMult; ///< factor of minimum Memory * number of nonzeros
204 R colMemMult; ///< factor of minimum Memory * number of nonzeros
205 R lMemMult; ///< factor of minimum Memory * number of nonzeros
206
207 Perm row; ///< row permutation matrices
208 Perm col; ///< column permutation matrices
209
210 L l; ///< L matrix
211 std::vector<R> diag; ///< Array of pivot elements
212 U u; ///< U matrix
213
214 R* work; ///< Working array: must always be left as 0!
215
216 Timer* factorTime; ///< Time spent in factorizations
217 int factorCount; ///< Number of factorizations
218 int hugeValues; ///< number of times huge values occurred during solve (only used in debug mode)
219 ///@}
220
221private:
222
223 //----------------------------------------
224 /**@name Private data */
225 ///@{
226 Temp temp; ///< Temporary storage
227 ///@}
228
229 //----------------------------------------
230 /**@name Solving
231 These helper methods are used during the factorization process.
232 The solve*-methods solve lower and upper triangular systems from
233 the left or from the right, respectively The methods with '2' in
234 the end solve two systems at the same time. The methods with
235 "Eps" in the end consider elements smaller then the passed epsilon
236 as zero.
237 */
238 ///@{
239 ///
240 void solveUright(R* wrk, R* vec) const;
241 ///
242 int solveUrightEps(R* vec, int* nonz, R eps, R* rhs);
243 ///
245 ///
246 int solveUright2eps(R* work1, R* vec1, R* work2, R* vec2, int* nonz, R eps);
247 ///
249 ///
250 void solveUpdateRight(R* vec);
251 ///
253 ///
254 void solveUleft(R* work, R* vec);
255 ///
257 ///
258 int solveLleft2forest(R* vec1, int* /* nonz */, R* vec2, R /* eps */);
259 ///
260 void solveLleft2(R* vec1, int* /* nonz */, R* vec2, R /* eps */);
261 ///
262 int solveLleftForest(R* vec, int* /* nonz */, R /* eps */);
263 ///
264 void solveLleft(R* vec) const;
265 ///
266 int solveLleftEps(R* vec, int* nonz, R eps);
267 ///
268 void solveUpdateLeft(R* vec);
269 ///
271
272 void inline updateSolutionVectorLright(R change, int j, R& vec, int* idx, int& nnz);
273 ///
274 void vSolveLright(R* vec, int* ridx, int& rn, R eps);
275 ///
276 void vSolveLright2(R* vec, int* ridx, int& rn, R eps,
277 R* vec2, int* ridx2, int& rn2, R eps2);
278 ///
279 void vSolveLright3(R* vec, int* ridx, int& rn, R eps,
280 R* vec2, int* ridx2, int& rn2, R eps2,
281 R* vec3, int* ridx3, int& rn3, R eps3);
282 ///
283 int vSolveUright(R* vec, int* vidx, R* rhs, int* ridx, int rn, R eps);
284 ///
285 void vSolveUrightNoNZ(R* vec, R* rhs, int* ridx, int rn, R eps);
286 ///
287 int vSolveUright2(R* vec, int* vidx, R* rhs, int* ridx, int rn, R eps,
288 R* vec2, R* rhs2, int* ridx2, int rn2, R eps2);
289 ///
290 int vSolveUpdateRight(R* vec, int* ridx, int n, R eps);
291 ///
292 void vSolveUpdateRightNoNZ(R* vec, R /*eps*/);
293 ///
294 int solveUleft(R eps, R* vec, int* vecidx, R* rhs, int* rhsidx, int rhsn);
295 ///
296 void solveUleftNoNZ(R eps, R* vec, R* rhs, int* rhsidx, int rhsn);
297 ///
298 int solveLleftForest(R eps, R* vec, int* nonz, int n);
299 ///
301 ///
302 int solveLleft(R eps, R* vec, int* nonz, int rn);
303 ///
304 void solveLleftNoNZ(R* vec);
305 ///
306 int solveUpdateLeft(R eps, R* vec, int* nonz, int n);
307
308 ///
310 ///
311 void forestMinColMem(int size);
312 ///
313 void forestReMaxCol(int col, int len);
314
315 ///
316 void initPerm();
317 ///
318 void initFactorMatrix(const SVectorBase<R>** vec, const R eps);
319 ///
320 void minLMem(int size);
321 ///
322 void setPivot(const int p_stage, const int p_col, const int p_row, const R val);
323 ///
325 ///
327
328 ///
330 ///
332
333 ///
335 ///
337
338 ///
340 ///
342 ///
344 ///
345 int updateRow(int r, int lv, int prow, int pcol, R pval, R eps);
346
347 ///
348 void eliminatePivot(int prow, int pos, R eps);
349 ///
350 void eliminateNucleus(const R eps, const R threshold);
351 ///
352 void minRowMem(int size);
353 ///
354 void minColMem(int size);
355 ///
356 void remaxCol(int p_col, int len);
357 ///
358 void packRows();
359 ///
361 ///
362 void remaxRow(int p_row, int len);
363 ///
364 int makeLvec(int p_len, int p_row);
365 ///@}
366
367protected:
368
369 //----------------------------------------
370 /**@name Solver methods */
371 ///@{
372 ///
373 void solveLright(R* vec);
374 ///
375 int solveRight4update(R* vec, int* nonz, R eps, R* rhs,
376 R* forest, int* forestNum, int* forestIdx);
377 ///
378 void solveRight(R* vec, R* rhs);
379 ///
381 R* rhs2, int* nonz, R eps, R* forest, int* forestNum, int* forestIdx);
382 ///
384 ///
385 void solveLeft(R* vec, R* rhs);
386 ///
387 int solveLeftEps(R* vec, R* rhs, int* nonz, R eps);
388 ///
389 int solveLeft2(R* vec1, int* nonz, R* vec2, R eps, R* rhs1, R* rhs2);
390
391 ///
393 R* vec, int* idx, /* result */
394 R* rhs, int* ridx, int rn, /* rhs & Forest */
395 R* forest, int* forestNum, int* forestIdx);
396 ///
398 R* vec, int* idx, /* result1 */
399 R* rhs, int* ridx, int rn, /* rhs1 */
400 R* vec2, R eps2, /* result2 */
401 R* rhs2, int* ridx2, int rn2, /* rhs2 */
402 R* forest, int* forestNum, int* forestIdx);
403 /// sparse version of above method
405 R eps, R* vec, int* idx, /* result1 */
406 R* rhs, int* ridx, int& rn, /* rhs1 */
407 R eps2, R* vec2, int* idx2, /* result2 */
408 R* rhs2, int* ridx2, int& rn2, /* rhs2 */
409 R* forest, int* forestNum, int* forestIdx);
410 ///
412 R* vec, int* idx, /* result1 */
413 R* rhs, int* ridx, int rn, /* rhs1 */
414 R* vec2, R eps2, /* result2 */
415 R* rhs2, int* ridx2, int rn2, /* rhs2 */
416 R* vec3, R eps3, /* result3 */
417 R* rhs3, int* ridx3, int rn3, /* rhs3 */
418 R* forest, int* forestNum, int* forestIdx);
419 /// sparse version of above method
421 R eps, R* vec, int* idx, /* result1 */
422 R* rhs, int* ridx, int& rn, /* rhs1 */
423 R eps2, R* vec2, int* idx2, /* result2 */
424 R* rhs2, int* ridx2, int& rn2, /* rhs2 */
425 R eps3, R* vec3, int* idx3, /* result3 */
426 R* rhs3, int* ridx3, int& rn3, /* rhs3 */
427 R* forest, int* forestNum, int* forestIdx);
428 ///
429 void vSolveRightNoNZ(R* vec, R eps, /* result */
430 R* rhs, int* ridx, int rn); /* rhs */
431 ///
432 int vSolveLeft(R eps,
433 R* vec, int* idx, /* result */
434 R* rhs, int* ridx, int rn); /* rhs */
435 ///
437 R* vec, /* result */
438 R* rhs, int* ridx, int rn); /* rhs */
439 ///
440 int vSolveLeft2(R eps,
441 R* vec, int* idx, /* result */
442 R* rhs, int* ridx, int rn, /* rhs */
443 R* vec2, /* result2 */
444 R* rhs2, int* ridx2, int rn2); /* rhs2 */
445 /// sparse version of solving 2 systems of equations
447 R* vec, int* idx, /* result */
448 R* rhs, int* ridx, int& rn, /* rhs */
449 R* vec2, int* idx2, /* result2 */
450 R* rhs2, int* ridx2, int& rn2); /* rhs2 */
451 ///
452 int vSolveLeft3(R eps,
453 R* vec, int* idx, /* result */
454 R* rhs, int* ridx, int rn, /* rhs */
455 R* vec2, /* result2 */
456 R* rhs2, int* ridx2, int rn2, /* rhs2 */
457 R* vec3, /* result3 */
458 R* rhs3, int* ridx3, int rn3); /* rhs3 */
459 /// sparse version of solving 3 systems of equations
461 R* vec, int* idx, /* result */
462 R* rhs, int* ridx, int& rn, /* rhs */
463 R* vec2, int* idx2, /* result2 */
464 R* rhs2, int* ridx2, int& rn2, /* rhs2 */
465 R* vec3, int* idx3, /* result2 */
466 R* rhs3, int* ridx3, int& rn3); /* rhs2 */
467
468 void forestUpdate(int col, R* work, int num, int* nonz);
469
470 void update(int p_col, R* p_work, const int* p_idx, int num);
471 void updateNoClear(int p_col, const R* p_work, const int* p_idx, int num);
472
473 ///
474 void factor(const SVectorBase<R>** vec, ///< Array of column VectorBase<R> pointers
475 R threshold, ///< pivoting threshold
476 R eps); ///< epsilon for zero detection
477 ///@}
478
479 //----------------------------------------
480 /**@name Debugging */
481 ///@{
482 ///
483 void dump() const;
484
485 ///
486 bool isConsistent() const;
487 ///@}
488};
489
490} // namespace soplex
491
492// For general templated functions
493#include "clufactor.hpp"
494
495#endif // _CLUFACTOR_H_
int mkwtz
markowitz number of pivot
Definition clufactor.h:74
int pos
position of pivot column in row
Definition clufactor.h:73
Pring & operator=(const Pring &)
blocked assignment operator
Pring(const Pring &)
blocked copy constructor
int idx
index of pivot row
Definition clufactor.h:72
Temporary data structures.
Definition clufactor.h:96
Pring * pivot_row
row index handlers for R linked list
Definition clufactor.h:105
int stage
stage of the structure
Definition clufactor.h:101
Pring * pivot_rowNZ
lists for rows to number of nonzeros
Definition clufactor.h:106
Temp & operator=(const Temp &)
blocked assignment operator
std::vector< R > s_max
maximum absolute value per row (or -1)
Definition clufactor.h:99
int * s_cact
lengths of columns of active submatrix
Definition clufactor.h:100
Temp(const Temp &)
blocked copy constructor
Pring * pivot_colNZ
lists for columns to number of nonzeros
Definition clufactor.h:104
void clear()
clears the structure
Pring * pivot_col
column index handlers for R linked list
Definition clufactor.h:103
void init(int p_dim)
initialization
Pring pivots
ring of selected pivot rows
Definition clufactor.h:102
Implementation of sparse LU factorization.
Definition clufactor.h:50
void solveUpdateRight(R *vec)
void selectPivots(R threshold)
R rowMemMult
factor of minimum Memory * number of nonzeros
Definition clufactor.h:203
void solveLright(R *vec)
int solveUpdateLeft(R eps, R *vec, int *nonz, int n)
int solveLeft2(R *vec1, int *nonz, R *vec2, R eps, R *rhs1, R *rhs2)
void eliminateRowSingletons()
R maxabs
maximum abs number in L and U
Definition clufactor.h:201
void vSolveRight4update3sparse(R eps, R *vec, int *idx, R *rhs, int *ridx, int &rn, R eps2, R *vec2, int *idx2, R *rhs2, int *ridx2, int &rn2, R eps3, R *vec3, int *idx3, R *rhs3, int *ridx3, int &rn3, R *forest, int *forestNum, int *forestIdx)
sparse version of above method
void solveUright2(R *work1, R *vec1, R *work2, R *vec2)
void setPivot(const int p_stage, const int p_col, const int p_row, const R val)
void forestPackColumns()
void minRowMem(int size)
void solveUpdateLeft2(R *vec1, R *vec2)
R lMemMult
factor of minimum Memory * number of nonzeros
Definition clufactor.h:205
int solveUrightEps(R *vec, int *nonz, R eps, R *rhs)
void minLMem(int size)
void remaxCol(int p_col, int len)
int vSolveUpdateRight(R *vec, int *ridx, int n, R eps)
R colMemMult
factor of minimum Memory * number of nonzeros
Definition clufactor.h:204
void solveLleftNoNZ(R *vec)
int solveRight4update(R *vec, int *nonz, R eps, R *rhs, R *forest, int *forestNum, int *forestIdx)
int vSolveUright(R *vec, int *vidx, R *rhs, int *ridx, int rn, R eps)
void solveUleft(R *work, R *vec)
bool isConsistent() const
void vSolveUpdateRightNoNZ(R *vec, R)
int vSolveRight4update2(R eps, R *vec, int *idx, R *rhs, int *ridx, int rn, R *vec2, R eps2, R *rhs2, int *ridx2, int rn2, R *forest, int *forestNum, int *forestIdx)
void updateNoClear(int p_col, const R *p_work, const int *p_idx, int num)
void updateSolutionVectorLright(R change, int j, R &vec, int *idx, int &nnz)
int vSolveRight4update3(R eps, R *vec, int *idx, R *rhs, int *ridx, int rn, R *vec2, R eps2, R *rhs2, int *ridx2, int rn2, R *vec3, R eps3, R *rhs3, int *ridx3, int rn3, R *forest, int *forestNum, int *forestIdx)
void solveLright2(R *vec1, R *vec2)
std::vector< R > diag
Array of pivot elements.
Definition clufactor.h:211
void vSolveRightNoNZ(R *vec, R eps, R *rhs, int *ridx, int rn)
void solveRight2(R *vec1, R *vec2, R *rhs1, R *rhs2)
void vSolveUrightNoNZ(R *vec, R *rhs, int *ridx, int rn, R eps)
void vSolveLright2(R *vec, int *ridx, int &rn, R eps, R *vec2, int *ridx2, int &rn2, R eps2)
int solveLleft2forest(R *vec1, int *, R *vec2, R)
void vSolveLeft3sparse(R eps, R *vec, int *idx, R *rhs, int *ridx, int &rn, R *vec2, int *idx2, R *rhs2, int *ridx2, int &rn2, R *vec3, int *idx3, R *rhs3, int *ridx3, int &rn3)
sparse version of solving 3 systems of equations
int solveLeftEps(R *vec, R *rhs, int *nonz, R eps)
void solveRight(R *vec, R *rhs)
R initMaxabs
maximum abs number in initail Matrix
Definition clufactor.h:200
int factorCount
Number of factorizations.
Definition clufactor.h:217
int solveRight2update(R *vec1, R *vec2, R *rhs1, R *rhs2, int *nonz, R eps, R *forest, int *forestNum, int *forestIdx)
int solveUright2eps(R *work1, R *vec1, R *work2, R *vec2, int *nonz, R eps)
void solveUright(R *wrk, R *vec) const
Timer * factorTime
Time spent in factorizations.
Definition clufactor.h:216
void solveUpdateLeft(R *vec)
int makeLvec(int p_len, int p_row)
void eliminatePivot(int prow, int pos, R eps)
Perm col
column permutation matrices
Definition clufactor.h:208
Temp temp
Temporary storage.
Definition clufactor.h:226
int vSolveLeft(R eps, R *vec, int *idx, R *rhs, int *ridx, int rn)
int solveLleftForest(R eps, R *vec, int *nonz, int n)
Perm row
row permutation matrices
Definition clufactor.h:207
int vSolveLeft3(R eps, R *vec, int *idx, R *rhs, int *ridx, int rn, R *vec2, R *rhs2, int *ridx2, int rn2, R *vec3, R *rhs3, int *ridx3, int rn3)
void vSolveLright(R *vec, int *ridx, int &rn, R eps)
void solveLleft(R *vec) const
void solveLleftForestNoNZ(R *vec)
void solveUleft2(R *work1, R *vec1, R *work2, R *vec2)
int vSolveUright2(R *vec, int *vidx, R *rhs, int *ridx, int rn, R eps, R *vec2, R *rhs2, int *ridx2, int rn2, R eps2)
void forestReMaxCol(int col, int len)
int hugeValues
number of times huge values occurred during solve (only used in debug mode)
Definition clufactor.h:218
R * work
Working array: must always be left as 0!
Definition clufactor.h:214
void initFactorMatrix(const SVectorBase< R > **vec, const R eps)
SLinSolver< R >::Status stat
Status indicator.
Definition clufactor.h:196
int solveUleft(R eps, R *vec, int *vecidx, R *rhs, int *rhsidx, int rhsn)
void minColMem(int size)
int solveLleftForest(R *vec, int *, R)
void vSolveLright3(R *vec, int *ridx, int &rn, R eps, R *vec2, int *ridx2, int &rn2, R eps2, R *vec3, int *ridx3, int &rn3, R eps3)
void forestUpdate(int col, R *work, int num, int *nonz)
void solveLleft2(R *vec1, int *, R *vec2, R)
int solveLleft(R eps, R *vec, int *nonz, int rn)
void vSolveLeftNoNZ(R eps, R *vec, R *rhs, int *ridx, int rn)
int vSolveRight4update(R eps, R *vec, int *idx, R *rhs, int *ridx, int rn, R *forest, int *forestNum, int *forestIdx)
int thedim
dimension of factorized matrix
Definition clufactor.h:198
void eliminateColSingletons()
int solveLleftEps(R *vec, int *nonz, R eps)
void vSolveRight4update2sparse(R eps, R *vec, int *idx, R *rhs, int *ridx, int &rn, R eps2, R *vec2, int *idx2, R *rhs2, int *ridx2, int &rn2, R *forest, int *forestNum, int *forestIdx)
sparse version of above method
void eliminateNucleus(const R eps, const R threshold)
void forestMinColMem(int size)
void update(int p_col, R *p_work, const int *p_idx, int num)
void solveUleftNoNZ(R eps, R *vec, R *rhs, int *rhsidx, int rhsn)
void remaxRow(int p_row, int len)
void vSolveLeft2sparse(R eps, R *vec, int *idx, R *rhs, int *ridx, int &rn, R *vec2, int *idx2, R *rhs2, int *ridx2, int &rn2)
sparse version of solving 2 systems of equations
int vSolveLeft2(R eps, R *vec, int *idx, R *rhs, int *ridx, int rn, R *vec2, R *rhs2, int *ridx2, int rn2)
void dump() const
int updateRow(int r, int lv, int prow, int pcol, R pval, R eps)
int nzCnt
number of nonzeros in U
Definition clufactor.h:199
void solveUpdateRight2(R *vec1, R *vec2)
void solveLeft(R *vec, R *rhs)
void factor(const SVectorBase< R > **vec, R threshold, R eps)
epsilon for zero detection
Safe arrays of data objects.
Definition dataarray.h:75
Status
status flags of the SLinSolver class.
Definition slinsolver.h:61
Wrapper for the system time query methods.
Definition timer.h:86
Everything should be within this namespace.
Sparse Linear Solver virtual base class.
Debugging, floating point type and parameter definitions.
Data structures for saving the working matrix and L factor.
Definition clufactor.h:170
int * rorig
original row permutation
Definition clufactor.h:188
int * row
column indices of L vectors
Definition clufactor.h:178
int startSize
size of array start
Definition clufactor.h:174
int updateType
type of updates to be used.
Definition clufactor.h:179
int size
size of arrays val and idx
Definition clufactor.h:171
int * ridx
indices of rows of L
Definition clufactor.h:186
int * rbeg
start of rows in rval and ridx
Definition clufactor.h:187
int * rperm
original row permutation
Definition clufactor.h:189
std::vector< R > val
values of L vectors
Definition clufactor.h:172
int * idx
indices of L vectors
Definition clufactor.h:173
int firstUpdate
number of first update L vector
Definition clufactor.h:175
std::vector< R > rval
values of rows of L
Definition clufactor.h:185
int * start
starting positions in val and idx
Definition clufactor.h:177
int firstUnused
number of first unused L vector
Definition clufactor.h:176
Data structures for saving the row and column permutations.
Definition clufactor.h:120
int * orig
orig[p] original index from p
Definition clufactor.h:121
int * perm
perm[i] permuted index from i
Definition clufactor.h:122
int * max
maximum available nonzeros per colunn: start[i] + max[i] == start[elem[i].next->idx] len[i] <= max[i]...
Definition clufactor.h:161
int * len
used nonzeros per column vector
Definition clufactor.h:160
int size
size of array idx
Definition clufactor.h:153
int used
used entries of array idx
Definition clufactor.h:154
Dring * elem
Array of ring elements.
Definition clufactor.h:152
std::vector< R > val
hold nonzero values: this is only initialized in the end of the factorization with DEFAULT updates.
Definition clufactor.h:156
Dring list
Double linked ringlist of VectorBase<R> indices in the order they appear in the column file
Definition clufactor.h:149
int * idx
hold row indices of nonzeros
Definition clufactor.h:155
int * start
starting positions in val and idx
Definition clufactor.h:159
int * max
maximum available nonzeros per row: start[i] + max[i] == start[elem[i].next->idx] len[i] <= max[i].
Definition clufactor.h:141
int * len
used nonzeros per row vectors
Definition clufactor.h:140
int size
size of arrays val and idx
Definition clufactor.h:135
int used
used entries of arrays idx and val
Definition clufactor.h:136
Dring * elem
Array of ring elements.
Definition clufactor.h:134
std::vector< R > val
hold nonzero values
Definition clufactor.h:137
Dring list
Double linked ringlist of VectorBase<R> indices in the order they appear in the row file
Definition clufactor.h:131
int * idx
hold column indices of nonzeros
Definition clufactor.h:138
int * start
starting positions in val and idx
Definition clufactor.h:139
Data structures for saving the working matrix and U factor.
Definition clufactor.h:127
struct soplex::CLUFactor::U::Col col
struct soplex::CLUFactor::U::Row row
Sparse vectors.
Timer class.