38 #define SOPLEX_WITH_L_ROWS 1 121 void init(
int p_dim);
256 void solveUright2(R* work1, R* vec1, R* work2, R* vec2);
258 int solveUright2eps(R* work1, R* vec1, R* work2, R* vec2,
int* nonz, R eps);
268 void solveUleft2(R* work1, R* vec1, R* work2, R* vec2);
289 R* vec2,
int* ridx2,
int& rn2, R eps2);
292 R* vec2,
int* ridx2,
int& rn2, R eps2,
293 R* vec3,
int* ridx3,
int& rn3, R eps3);
295 int vSolveUright(R* vec,
int* vidx, R* rhs,
int* ridx,
int rn, R eps);
299 int vSolveUright2(R* vec,
int* vidx, R* rhs,
int* ridx,
int rn, R eps,
300 R* vec2, R* rhs2,
int* ridx2,
int rn2, R eps2);
306 int solveUleft(R eps, R* vec,
int* vecidx, R* rhs,
int* rhsidx,
int rhsn);
308 void solveUleftNoNZ(R eps, R* vec, R* rhs,
int* rhsidx,
int rhsn);
314 int solveLleft(R eps, R* vec,
int* nonz,
int rn);
334 void setPivot(
const int p_stage,
const int p_col,
const int p_row,
const R val);
357 int updateRow(
int r,
int lv,
int prow,
int pcol, R pval, R eps);
388 R* forest,
int* forestNum,
int* forestIdx);
393 R* rhs2,
int* nonz, R eps, R* forest,
int* forestNum,
int* forestIdx);
395 void solveRight2(R* vec1, R* vec2, R* rhs1, R* rhs2);
401 int solveLeft2(R* vec1,
int* nonz, R* vec2, R eps, R* rhs1, R* rhs2);
406 R* rhs,
int* ridx,
int rn,
407 R* forest,
int* forestNum,
int* forestIdx);
411 R* rhs,
int* ridx,
int rn,
413 R* rhs2,
int* ridx2,
int rn2,
414 R* forest,
int* forestNum,
int* forestIdx);
417 R eps, R* vec,
int*
idx,
418 R* rhs,
int* ridx,
int& rn,
419 R eps2, R* vec2,
int* idx2,
420 R* rhs2,
int* ridx2,
int& rn2,
421 R* forest,
int* forestNum,
int* forestIdx);
425 R* rhs,
int* ridx,
int rn,
427 R* rhs2,
int* ridx2,
int rn2,
429 R* rhs3,
int* ridx3,
int rn3,
430 R* forest,
int* forestNum,
int* forestIdx);
433 R eps, R* vec,
int*
idx,
434 R* rhs,
int* ridx,
int& rn,
435 R eps2, R* vec2,
int* idx2,
436 R* rhs2,
int* ridx2,
int& rn2,
437 R eps3, R* vec3,
int* idx3,
438 R* rhs3,
int* ridx3,
int& rn3,
439 R* forest,
int* forestNum,
int* forestIdx);
442 R* rhs,
int* ridx,
int rn);
446 R* rhs,
int* ridx,
int rn);
450 R* rhs,
int* ridx,
int rn);
454 R* rhs,
int* ridx,
int rn,
456 R* rhs2,
int* ridx2,
int rn2);
460 R* rhs,
int* ridx,
int& rn,
462 R* rhs2,
int* ridx2,
int& rn2);
466 R* rhs,
int* ridx,
int rn,
468 R* rhs2,
int* ridx2,
int rn2,
470 R* rhs3,
int* ridx3,
int rn3);
474 R* rhs,
int* ridx,
int& rn,
476 R* rhs2,
int* ridx2,
int& rn2,
478 R* rhs3,
int* ridx3,
int& rn3);
480 void forestUpdate(
int col, R* work,
int num,
int* nonz);
482 void update(
int p_col, R* p_work,
const int* p_idx,
int num);
483 void updateNoClear(
int p_col,
const R* p_work,
const int* p_idx,
int num);
505 #include "clufactor.hpp" 507 #endif // _CLUFACTOR_H_ void solveLleft2(R *vec1, int *, R *vec2, R)
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)
int * len
used nonzeros per row vectors
int updateType
type of updates to be used.
void eliminateNucleus(const R eps, const R threshold)
void vSolveUpdateRightNoNZ(R *vec, R)
int vSolveLeft2(R eps, R *vec, int *idx, R *rhs, int *ridx, int rn, R *vec2, R *rhs2, int *ridx2, int rn2)
Dring list
Double linked ringlist of VectorBase<R> indices in the order they appear in the column file...
int * max
maximum available nonzeros per row: start[i] + max[i] == start[elem[i].next->idx] len[i] <= max[i]...
void solveUleft(R *work, R *vec)
std::vector< R > val
hold nonzero values: this is only initialized in the end of the factorization with DEFAULT updates...
void forestMinColMem(int size)
void solveLleftNoNZ(R *vec)
Pring * pivot_rowNZ
lists for rows to number of nonzeros
int solveLleftEps(R *vec, int *nonz, R eps)
int * start
starting positions in val and idx
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)
Data structures for saving the row and column permutations.
void solveUright(R *wrk, R *vec) const
void updateSolutionVectorLright(R change, int j, R &vec, int *idx, int &nnz)
R lMemMult
factor of minimum Memory * number of nonzeros
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
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
void setPivot(const int p_stage, const int p_col, const int p_row, const R val)
int size
size of array idx
void update(int p_col, R *p_work, const int *p_idx, int num)
int vSolveUpdateRight(R *vec, int *ridx, int n, R eps)
int * rorig
original row permutation
Dring * elem
Array of ring elements.
int hugeValues
number of times huge values occurred during solve (only used in debug mode)
void updateNoClear(int p_col, const R *p_work, const int *p_idx, int num)
Sparse Linear Solver virtual base class.
void eliminatePivot(int prow, int pos, R eps)
int mkwtz
markowitz number of pivot
Pring * pivot_col
column index handlers for R linked list
Perm row
row permutation matrices
Dring * elem
Array of ring elements.
Perm col
column permutation matrices
void initFactorMatrix(const SVectorBase< R > **vec, const R eps)
Data structures for saving the working matrix and L factor.
int * orig
orig[p] original index from p
void vSolveUrightNoNZ(R *vec, R *rhs, int *ridx, int rn, R eps)
void eliminateRowSingletons()
int * len
used nonzeros per column vector
int updateRow(int r, int lv, int prow, int pcol, R pval, R eps)
R * work
Working array: must always be left as 0!
int size
size of arrays val and idx
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 solveRight2(R *vec1, R *vec2, R *rhs1, R *rhs2)
Pring * pivot_row
row index handlers for R linked list
void solveLright2(R *vec1, R *vec2)
int used
used entries of arrays idx and val
void setTolerances(std::shared_ptr< Tolerances > tolerances)
set tolerances
int startSize
size of array start
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)
int solveLleftForest(R *vec, int *, R)
Pring * pivot_colNZ
lists for columns to number of nonzeros
int factorCount
Number of factorizations.
int stage
stage of the structure
int vSolveLeft(R eps, R *vec, int *idx, R *rhs, int *ridx, int rn)
int pos
position of pivot column in row
void solveLleftForestNoNZ(R *vec)
void vSolveLright2(R *vec, int *ridx, int &rn, R eps, R *vec2, int *ridx2, int &rn2, R eps2)
void vSolveRightNoNZ(R *vec, R eps, R *rhs, int *ridx, int rn)
int firstUnused
number of first unused L vector
Temp temp
Temporary storage.
int solveLleft2forest(R *vec1, int *, R *vec2, R)
void solveUright2(R *work1, R *vec1, R *work2, R *vec2)
R maxabs
maximum abs number in L and U
void solveUpdateLeft2(R *vec1, R *vec2)
void solveLeft(R *vec, R *rhs)
int thedim
dimension of factorized matrix
std::vector< R > val
hold nonzero values
std::vector< R > val
values of L vectors
int * start
starting positions in val and idx
Debugging, floating point type and parameter definitions.
int vSolveUright2(R *vec, int *vidx, R *rhs, int *ridx, int rn, R eps, R *vec2, R *rhs2, int *ridx2, int rn2, R eps2)
int size
size of arrays val and idx
void forestUpdate(int col, R *work, int num, int *nonz)
int * idx
indices of L vectors
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
int * perm
perm[i] permuted index from i
bool isConsistent() const
void eliminateColSingletons()
void solveUleft2(R *work1, R *vec1, R *work2, R *vec2)
Implementation of sparse LU factorization.This class implements a sparse LU factorization with either...
Everything should be within this namespace.
int solveLeft2(R *vec1, int *nonz, R *vec2, R eps, R *rhs1, R *rhs2)
void factor(const SVectorBase< R > **vec, R threshold, R eps)
epsilon for zero detection
void remaxRow(int p_row, int len)
R rowMemMult
factor of minimum Memory * number of nonzeros
int firstUpdate
number of first update L vector
Pring pivots
ring of selected pivot rows
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)
std::vector< R > rval
values of rows of L
void vSolveLeftNoNZ(R eps, R *vec, R *rhs, int *ridx, int rn)
Dring list
Double linked ringlist of VectorBase<R> indices in the order they appear in the row file...
Timer * factorTime
Time spent in factorizations.
int solveLeftEps(R *vec, R *rhs, int *nonz, R eps)
std::shared_ptr< Tolerances > _tolerances
Tolerances for the factorization.
void forestReMaxCol(int col, int len)
int vSolveUright(R *vec, int *vidx, R *rhs, int *ridx, int rn, R eps)
int * idx
hold row indices of nonzeros
int idx
index of pivot row
void solveUpdateRight2(R *vec1, R *vec2)
void remaxCol(int p_col, int len)
int * ridx
indices of rows of L
int solveRight4update(R *vec, int *nonz, R eps, R *rhs, R *forest, int *forestNum, int *forestIdx)
int * max
maximum available nonzeros per colunn: start[i] + max[i] == start[elem[i].next->idx] len[i] <= max[i]...
void solveUleftNoNZ(R eps, R *vec, R *rhs, int *rhsidx, int rhsn)
int makeLvec(int p_len, int p_row)
int vSolveRight4update(R eps, R *vec, int *idx, R *rhs, int *ridx, int rn, R *forest, int *forestNum, int *forestIdx)
int * row
column indices of L vectors
int * rbeg
start of rows in rval and ridx
int * s_cact
lengths of columns of active submatrix
void solveUpdateLeft(R *vec)
Sparse vectors.Class SVectorBase provides packed sparse vectors. Such are a sparse vectors...
int nzCnt
number of nonzeros in U
int * rperm
original row permutation
int * start
starting positions in val and idx
int * idx
hold column indices of nonzeros
int used
used entries of array idx
void selectPivots(R threshold)
std::vector< R > diag
Array of pivot elements.
Status
status flags of the SLinSolver class.
int solveUrightEps(R *vec, int *nonz, R eps, R *rhs)
Temporary data structures.
R colMemMult
factor of minimum Memory * number of nonzeros
void solveLleft(R *vec) const
Data structures for saving the working matrix and U factor.
SLinSolver< R >::Status stat
Status indicator.
void solveRight(R *vec, R *rhs)
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 vSolveLright(R *vec, int *ridx, int &rn, R eps)
Wrapper for the system time query methods.
const std::shared_ptr< Tolerances > tolerances() const
get tolerances
void solveUpdateRight(R *vec)
R initMaxabs
maximum abs number in initail Matrix
std::vector< R > s_max
maximum absolute value per row (or -1)