Implementation of sparse LU factorization with Rational precision.This class implements a sparse LU factorization with either FOREST-TOMLIN or ETA updates, using dynamic Markowitz pivoting. More...
#include <clufactor_rational.h>
Classes | |
struct | Dring |
struct | L |
Data structures for saving the working matrix and L factor. More... | |
struct | Perm |
Data structures for saving the row and column permutations. More... | |
class | Pring |
Pivot Ring. More... | |
class | Temp |
Temporary data structures. More... | |
struct | U |
Data structures for saving the working matrix and U factor. More... | |
Protected Member Functions | |
Solver methods | |
void | solveLright (Rational *vec) |
int | solveRight4update (Rational *vec, int *nonz, Rational *rhs, Rational *forest, int *forestNum, int *forestIdx) |
void | solveRight (Rational *vec, Rational *rhs) |
int | solveRight2update (Rational *vec1, Rational *vec2, Rational *rhs1, Rational *rhs2, int *nonz, Rational *forest, int *forestNum, int *forestIdx) |
void | solveRight2 (Rational *vec1, Rational *vec2, Rational *rhs1, Rational *rhs2) |
void | solveLeft (Rational *vec, Rational *rhs) |
int | solveLeftEps (Rational *vec, Rational *rhs, int *nonz) |
int | solveLeft2 (Rational *vec1, int *nonz, Rational *vec2, Rational *rhs1, Rational *rhs2) |
int | vSolveRight4update (Rational *vec, int *idx, Rational *rhs, int *ridx, int rn, Rational *forest, int *forestNum, int *forestIdx) |
int | vSolveRight4update2 (Rational *vec, int *idx, Rational *rhs, int *ridx, int rn, Rational *vec2, Rational *rhs2, int *ridx2, int rn2, Rational *forest, int *forestNum, int *forestIdx) |
int | vSolveRight4update3 (Rational *vec, int *idx, Rational *rhs, int *ridx, int rn, Rational *vec2, Rational *rhs2, int *ridx2, int rn2, Rational *vec3, Rational *rhs3, int *ridx3, int rn3, Rational *forest, int *forestNum, int *forestIdx) |
void | vSolveRightNoNZ (Rational *vec2, Rational *rhs2, int *ridx2, int rn2) |
int | vSolveLeft (Rational *vec, int *idx, Rational *rhs, int *ridx, int rn) |
void | vSolveLeftNoNZ (Rational *vec, Rational *rhs, int *ridx, int rn) |
int | vSolveLeft2 (Rational *vec, int *idx, Rational *rhs, int *ridx, int rn, Rational *vec2, Rational *rhs2, int *ridx2, int rn2) |
int | vSolveLeft3 (Rational *vec, int *idx, Rational *rhs, int *ridx, int rn, Rational *vec2, Rational *rhs2, int *ridx2, int rn2, Rational *vec3, Rational *rhs3, int *ridx3, int rn3) |
void | forestUpdate (int col, Rational *work, int num, int *nonz) |
void | update (int p_col, Rational *p_work, const int *p_idx, int num) |
void | updateNoClear (int p_col, const Rational *p_work, const int *p_idx, int num) |
void | factor (const SVectorRational **vec, const Rational &threshold) |
pivoting threshold More... | |
Debugging | |
void | dump () const |
bool | isConsistent () const |
Protected Attributes | |
Protected data | |
SLinSolverRational::Status | stat |
Status indicator. More... | |
int | thedim |
dimension of factorized matrix More... | |
int | nzCnt |
number of nonzeros in U More... | |
Rational | initMaxabs |
maximum abs number in initail Matrix More... | |
Rational | maxabs |
maximum abs number in L and U More... | |
Real | rowMemMult |
factor of minimum Memory * number of nonzeros More... | |
Real | colMemMult |
factor of minimum Memory * number of nonzeros More... | |
Real | lMemMult |
factor of minimum Memory * number of nonzeros More... | |
Perm | row |
row permutation matrices More... | |
Perm | col |
column permutation matrices More... | |
L | l |
L matrix. More... | |
VectorRational | diag |
Array of pivot elements. More... | |
U | u |
U matrix. More... | |
Rational * | work |
Working array: must always be left as 0! More... | |
Timer * | factorTime |
Time spent in factorizations. More... | |
int | factorCount |
Number of factorizations. More... | |
Real | timeLimit |
Time limit on factorization or solves. More... | |
Private Member Functions | |
Solving | |
These helper methods are used during the factorization process. The solve*-methods solve lower and upper triangular systems from the left or from the right, respectively The methods with '2' in the end solve two systems at the same time. The methods with "Eps" in the end consider elements smaller then the passed epsilon as zero. | |
void | solveUright (Rational *wrk, Rational *vec) |
int | solveUrightEps (Rational *vec, int *nonz, Rational *rhs) |
void | solveUright2 (Rational *work1, Rational *vec1, Rational *work2, Rational *vec2) |
int | solveUright2eps (Rational *work1, Rational *vec1, Rational *work2, Rational *vec2, int *nonz) |
void | solveLright2 (Rational *vec1, Rational *vec2) |
void | solveUpdateRight (Rational *vec) |
void | solveUpdateRight2 (Rational *vec1, Rational *vec2) |
void | solveUleft (Rational *work, Rational *vec) |
void | solveUleft2 (Rational *work1, Rational *vec1, Rational *work2, Rational *vec2) |
int | solveLleft2forest (Rational *vec1, int *, Rational *vec2) |
void | solveLleft2 (Rational *vec1, int *, Rational *vec2) |
int | solveLleftForest (Rational *vec, int *) |
void | solveLleft (Rational *vec) |
int | solveLleftEps (Rational *vec, int *nonz) |
void | solveUpdateLeft (Rational *vec) |
void | solveUpdateLeft2 (Rational *vec1, Rational *vec2) |
int | vSolveLright (Rational *vec, int *ridx, int rn) |
void | vSolveLright2 (Rational *vec, int *ridx, int *rnptr, Rational *vec2, int *ridx2, int *rn2ptr) |
void | vSolveLright3 (Rational *vec, int *ridx, int *rnptr, Rational *vec2, int *ridx2, int *rn2ptr, Rational *vec3, int *ridx3, int *rn3ptr) |
int | vSolveUright (Rational *vec, int *vidx, Rational *rhs, int *ridx, int rn) |
void | vSolveUrightNoNZ (Rational *vec, Rational *rhs, int *ridx, int rn) |
int | vSolveUright2 (Rational *vec, int *vidx, Rational *rhs, int *ridx, int rn, Rational *vec2, Rational *rhs2, int *ridx2, int rn2) |
int | vSolveUpdateRight (Rational *vec, int *ridx, int n) |
void | vSolveUpdateRightNoNZ (Rational *vec) |
int | solveUleft (Rational *vec, int *vecidx, Rational *rhs, int *rhsidx, int rhsn) |
void | solveUleftNoNZ (Rational *vec, Rational *rhs, int *rhsidx, int rhsn) |
int | solveLleftForest (Rational *vec, int *nonz, int n) |
void | solveLleftForestNoNZ (Rational *vec) |
int | solveLleft (Rational *vec, int *nonz, int rn) |
void | solveLleftNoNZ (Rational *vec) |
int | solveUpdateLeft (Rational *vec, int *nonz, int n) |
void | forestPackColumns () |
void | forestMinColMem (int size) |
void | forestReMaxCol (int col, int len) |
void | initPerm () |
void | initFactorMatrix (const SVectorRational **vec) |
void | minLMem (int size) |
void | setPivot (const int p_stage, const int p_col, const int p_row, const Rational &val) |
void | colSingletons () |
void | rowSingletons () |
void | initFactorRings () |
void | freeFactorRings () |
int | setupColVals () |
void | setupRowVals () |
void | eliminateRowSingletons () |
void | eliminateColSingletons () |
void | selectPivots (const Rational &threshold) |
int | updateRow (int r, int lv, int prow, int pcol, const Rational &pval) |
void | eliminatePivot (int prow, int pos) |
void | eliminateNucleus (const Rational &threshold) |
void | minRowMem (int size) |
void | minColMem (int size) |
void | remaxCol (int p_col, int len) |
void | packRows () |
void | packColumns () |
void | remaxRow (int p_row, int len) |
int | makeLvec (int p_len, int p_row) |
bool | timeLimitReached () |
Private Attributes | |
Private data | |
Temp | temp |
Temporary storage. More... | |
Implementation of sparse LU factorization with Rational precision.
This class implements a sparse LU factorization with either FOREST-TOMLIN or ETA updates, using dynamic Markowitz pivoting.
Definition at line 39 of file clufactor_rational.h.
|
private |
|
protected |
Referenced by CLUFactorRational::timeLimitReached().
|
private |
|
private |
|
private |
|
private |
|
protected |
pivoting threshold
vec | Array of column vector pointers |
Referenced by CLUFactorRational::timeLimitReached().
|
private |
|
private |
|
private |
|
protected |
Referenced by CLUFactorRational::timeLimitReached().
|
private |
|
private |
|
private |
|
private |
|
protected |
Referenced by CLUFactorRational::timeLimitReached().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Referenced by CLUFactorRational::timeLimitReached().
|
protected |
Referenced by CLUFactorRational::timeLimitReached().
Referenced by CLUFactorRational::timeLimitReached().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
Referenced by CLUFactorRational::timeLimitReached().
Referenced by CLUFactorRational::timeLimitReached().
Referenced by CLUFactorRational::timeLimitReached().
|
protected |
Referenced by CLUFactorRational::timeLimitReached().
|
protected |
Referenced by CLUFactorRational::timeLimitReached().
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 354 of file clufactor_rational.h.
References CLUFactorRational::dump(), CLUFactorRational::factor(), CLUFactorRational::forestUpdate(), CLUFactorRational::Dring::idx, CLUFactorRational::isConsistent(), CLUFactorRational::solveLeft(), CLUFactorRational::solveLeft2(), CLUFactorRational::solveLeftEps(), CLUFactorRational::solveLright(), CLUFactorRational::solveRight(), CLUFactorRational::solveRight2(), CLUFactorRational::solveRight2update(), CLUFactorRational::solveRight4update(), SLinSolverRational::TIME, Timer::time(), CLUFactorRational::timeLimit, CLUFactorRational::update(), CLUFactorRational::updateNoClear(), CLUFactorRational::vSolveLeft(), CLUFactorRational::vSolveLeft2(), CLUFactorRational::vSolveLeft3(), CLUFactorRational::vSolveLeftNoNZ(), CLUFactorRational::vSolveRight4update(), CLUFactorRational::vSolveRight4update2(), CLUFactorRational::vSolveRight4update3(), and CLUFactorRational::vSolveRightNoNZ().
|
protected |
Referenced by CLUFactorRational::timeLimitReached().
|
protected |
Referenced by CLUFactorRational::timeLimitReached().
|
private |
Referenced by CLUFactorRational::timeLimitReached().
|
protected |
Referenced by CLUFactorRational::timeLimitReached().
|
protected |
Referenced by CLUFactorRational::timeLimitReached().
Referenced by CLUFactorRational::timeLimitReached().
|
private |
|
private |
|
private |
|
protected |
Referenced by CLUFactorRational::timeLimitReached().
|
protected |
Referenced by CLUFactorRational::timeLimitReached().
|
protected |
Referenced by CLUFactorRational::timeLimitReached().
Referenced by CLUFactorRational::timeLimitReached().
|
private |
|
private |
|
private |
|
protected |
column permutation matrices
Definition at line 197 of file clufactor_rational.h.
Referenced by SLUFactorRational::SLUFactorRational().
|
protected |
factor of minimum Memory * number of nonzeros
Definition at line 193 of file clufactor_rational.h.
|
protected |
Array of pivot elements.
Definition at line 200 of file clufactor_rational.h.
Referenced by SLUFactorRational::SLUFactorRational().
|
protected |
Number of factorizations.
Definition at line 206 of file clufactor_rational.h.
Referenced by SLUFactorRational::getFactorCount(), SLUFactorRational::resetCounters(), and SLUFactorRational::SLUFactorRational().
|
protected |
Time spent in factorizations.
Definition at line 205 of file clufactor_rational.h.
Referenced by SLUFactorRational::getFactorTime(), SLUFactorRational::resetCounters(), SLUFactorRational::resetFactorTime(), and SLUFactorRational::SLUFactorRational().
|
protected |
maximum abs number in initail Matrix
Definition at line 189 of file clufactor_rational.h.
|
protected |
L matrix.
Definition at line 199 of file clufactor_rational.h.
Referenced by SLUFactorRational::memory(), and SLUFactorRational::SLUFactorRational().
|
protected |
factor of minimum Memory * number of nonzeros
Definition at line 194 of file clufactor_rational.h.
|
protected |
Definition at line 190 of file clufactor_rational.h.
|
protected |
number of nonzeros in U
Definition at line 188 of file clufactor_rational.h.
Referenced by SLUFactorRational::memory(), and SLUFactorRational::SLUFactorRational().
|
protected |
row permutation matrices
Definition at line 196 of file clufactor_rational.h.
Referenced by SLUFactorRational::SLUFactorRational().
|
protected |
factor of minimum Memory * number of nonzeros
Definition at line 192 of file clufactor_rational.h.
|
protected |
Status indicator.
Definition at line 185 of file clufactor_rational.h.
Referenced by SLUFactorRational::status().
|
private |
Temporary storage.
Definition at line 215 of file clufactor_rational.h.
|
protected |
dimension of factorized matrix
Definition at line 187 of file clufactor_rational.h.
Referenced by SLUFactorRational::dim(), and SLUFactorRational::SLUFactorRational().
|
protected |
Time limit on factorization or solves.
Definition at line 207 of file clufactor_rational.h.
Referenced by SLUFactorRational::setTimeLimit(), SLUFactorRational::SLUFactorRational(), and CLUFactorRational::timeLimitReached().
|
protected |
U matrix.
Definition at line 201 of file clufactor_rational.h.
Referenced by SLUFactorRational::SLUFactorRational().
|
protected |
Working array: must always be left as 0!
Definition at line 203 of file clufactor_rational.h.
Referenced by SLUFactorRational::SLUFactorRational().