19 #ifndef _CLUFACTOR_RATIONAL_H_ 20 #define _CLUFACTOR_RATIONAL_H_ 101 void init(
int p_dim);
265 Rational* vec2,
int* ridx2,
int* rn2ptr);
268 Rational* vec2,
int* ridx2,
int* rn2ptr,
269 Rational* vec3,
int* ridx3,
int* rn3ptr);
310 void setPivot(
const int p_stage,
const int p_col,
const int p_row,
const Rational& val);
375 Rational* forest,
int* forestNum,
int* forestIdx);
380 Rational* rhs2,
int* nonz,
Rational* forest,
int* forestNum,
int* forestIdx);
394 Rational* forest,
int* forestNum,
int* forestIdx);
400 Rational* rhs2,
int* ridx2,
int rn2,
401 Rational* forest,
int* forestNum,
int* forestIdx);
407 Rational* rhs2,
int* ridx2,
int rn2,
409 Rational* rhs3,
int* ridx3,
int rn3,
410 Rational* forest,
int* forestNum,
int* forestIdx);
413 Rational* rhs2,
int* ridx2,
int rn2);
427 Rational* rhs2,
int* ridx2,
int rn2);
432 Rational* rhs2,
int* ridx2,
int rn2,
434 Rational* rhs3,
int* ridx3,
int rn3);
438 void update(
int p_col,
Rational* p_work,
const int* p_idx,
int num);
458 #include "clufactor_rational.hpp" 459 #endif // _CLUFACTOR_RATIONAL_H_ int mkwtz
markowitz number of pivot
void remaxCol(int p_col, int len)
Real lMemMult
factor of minimum Memory * number of nonzeros
VectorRational val
hold nonzero values
int * start
starting positions in val and idx
int firstUpdate
number of first update L vector
int * ridx
indices of rows of L
int solveRight2update(Rational *vec1, Rational *vec2, Rational *rhs1, Rational *rhs2, int *nonz, Rational *forest, int *forestNum, int *forestIdx)
int used
used entries of array idx
int * max
maximum available nonzeros per colunn: start[i] + max[i] == start[elem[i].next->idx] len[i] <= max[i]...
number< gmp_rational, et_off > Rational
Rational * work
Working array: must always be left as 0!
The time limit has been hit.
int solveRight4update(Rational *vec, int *nonz, Rational *rhs, Rational *forest, int *forestNum, int *forestIdx)
Pring pivots
ring of selected pivot rows
int * max
maximum available nonzeros per row: start[i] + max[i] == start[elem[i].next->idx] len[i] <= max[i]...
Dring list
Double linked ringlist of vector indices in the order they appear in the column file.
void solveLleft(Rational *vec)
Real colMemMult
factor of minimum Memory * number of nonzeros
int firstUnused
number of first unused L vector
void solveUleft(Rational *work, Rational *vec)
VectorRational diag
Array of pivot elements.
int thedim
dimension of factorized matrix
int * row
column indices of L vectors
void forestReMaxCol(int col, int len)
int solveLleft2forest(Rational *vec1, int *, Rational *vec2)
VectorRational val
hold nonzero values: this is only initialized in the end of the factorization with DEFAULT updates...
void solveUpdateLeft(Rational *vec)
Temp temp
Temporary storage.
VectorRational val
values of L vectors
void update(int p_col, Rational *p_work, const int *p_idx, int num)
int used
used entries of arrays idx and val
void eliminateRowSingletons()
void factor(const SVectorRational **vec, const Rational &threshold)
pivoting threshold
Data structures for saving the working matrix and L factor.
int vSolveUright2(Rational *vec, int *vidx, Rational *rhs, int *ridx, int rn, Rational *vec2, Rational *rhs2, int *ridx2, int rn2)
void solveUpdateRight2(Rational *vec1, Rational *vec2)
Real timeLimit
Time limit on factorization or solves.
int solveUright2eps(Rational *work1, Rational *vec1, Rational *work2, Rational *vec2, int *nonz)
Sparse Linear Solver virtual base class with Rational precision.
int updateType
type of updates to be used.
void initFactorMatrix(const SVectorRational **vec)
void eliminatePivot(int prow, int pos)
Data structures for saving the working matrix and U factor.
int solveUrightEps(Rational *vec, int *nonz, Rational *rhs)
int vSolveLeft(Rational *vec, int *idx, Rational *rhs, int *ridx, int rn)
void solveLright(Rational *vec)
int solveLleftEps(Rational *vec, int *nonz)
Rational initMaxabs
maximum abs number in initail Matrix
void solveRight(Rational *vec, Rational *rhs)
int vSolveUright(Rational *vec, int *vidx, Rational *rhs, int *ridx, int rn)
int * start
starting positions in val and idx
int vSolveRight4update(Rational *vec, int *idx, Rational *rhs, int *ridx, int rn, Rational *forest, int *forestNum, int *forestIdx)
int solveLeftEps(Rational *vec, Rational *rhs, int *nonz)
void solveLleftNoNZ(Rational *vec)
void solveLright2(Rational *vec1, Rational *vec2)
int pos
position of pivot column in row
void solveUright2(Rational *work1, Rational *vec1, Rational *work2, Rational *vec2)
void solveUleft2(Rational *work1, Rational *vec1, Rational *work2, Rational *vec2)
int vSolveLeft2(Rational *vec, int *idx, Rational *rhs, int *ridx, int rn, Rational *vec2, Rational *rhs2, int *ridx2, int rn2)
int solveLeft2(Rational *vec1, int *nonz, Rational *vec2, Rational *rhs1, Rational *rhs2)
void solveUright(Rational *wrk, Rational *vec)
void setPivot(const int p_stage, const int p_col, const int p_row, const Rational &val)
Real rowMemMult
factor of minimum Memory * number of nonzeros
void solveLeft(Rational *vec, Rational *rhs)
Pring * pivot_rowNZ
lists for rows to number of nonzeros
void vSolveLeftNoNZ(Rational *vec, Rational *rhs, int *ridx, int rn)
int * s_cact
lengths of columns of active submatrix
int vSolveLright(Rational *vec, int *ridx, int rn)
void vSolveUrightNoNZ(Rational *vec, Rational *rhs, int *ridx, int rn)
Dring list
Double linked ringlist of vector indices in the order they appear in the row file.
Perm row
row permutation matrices
int * rorig
original row permutation
int size
size of array idx
void selectPivots(const Rational &threshold)
void vSolveRightNoNZ(Rational *vec2, Rational *rhs2, int *ridx2, int rn2)
virtual Real time() const =0
Timer * factorTime
Time spent in factorizations.
int stage
stage of the structure
bool isConsistent() const
Temporary data structures.
Debugging, floating point type and parameter definitions.
int * idx
array of size val.dim() storing indices of L vectors
VectorRational s_max
maximum absolute value per row (or -1)
void solveRight2(Rational *vec1, Rational *vec2, Rational *rhs1, Rational *rhs2)
void vSolveLright3(Rational *vec, int *ridx, int *rnptr, Rational *vec2, int *ridx2, int *rn2ptr, Rational *vec3, int *ridx3, int *rn3ptr)
int makeLvec(int p_len, int p_row)
Collection of dense, sparse, and semi-sparse vectors.
Implementation of sparse LU factorization with Rational precision.This class implements a sparse LU f...
Everything should be within this namespace.
void solveLleft2(Rational *vec1, int *, Rational *vec2)
int * perm
perm[i] permuted index from i
void remaxRow(int p_row, int len)
int * len
used nonzeros per column vector
int * len
used nonzeros per row vectors
int * idx
hold row indices of nonzeros
int updateRow(int r, int lv, int prow, int pcol, const Rational &pval)
int vSolveUpdateRight(Rational *vec, int *ridx, int n)
int * start
starting positions in val and idx
Dring * elem
Array of ring elements.
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)
int factorCount
Number of factorizations.
int startSize
size of array start
void vSolveUpdateRightNoNZ(Rational *vec)
void forestUpdate(int col, Rational *work, int num, int *nonz)
void eliminateNucleus(const Rational &threshold)
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 solveLleftForest(Rational *vec, int *)
Rational maxabs
maximum abs number in L and U
Perm col
column permutation matrices
VectorRational rval
values of rows of L
Pring * pivot_colNZ
lists for columns to number of nonzeros
int * rperm
original row permutation
void solveUpdateLeft2(Rational *vec1, Rational *vec2)
Pring * pivot_row
row index handlers for Real linked list
void vSolveLright2(Rational *vec, int *ridx, int *rnptr, Rational *vec2, int *ridx2, int *rn2ptr)
void updateNoClear(int p_col, const Rational *p_work, const int *p_idx, int num)
int * rbeg
start of rows in rval and ridx
void solveUpdateRight(Rational *vec)
Dring * elem
Array of ring elements.
int * idx
array of length val.dim() to hold column indices of nonzeros in val
Pring * pivot_col
column index handlers for Real linked list
void solveLleftForestNoNZ(Rational *vec)
void eliminateColSingletons()
int idx
index of pivot row
Status
status flags of the SLinSolverRational class.
Data structures for saving the row and column permutations.
Wrapper for the system time query methods.
void forestMinColMem(int size)
int * orig
orig[p] original index from p
void solveUleftNoNZ(Rational *vec, Rational *rhs, int *rhsidx, int rhsn)
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)
int nzCnt
number of nonzeros in U
SLinSolverRational::Status stat
Status indicator.