40 #define MINSTABILITY REAL(4e-2) 120 int rsize = rhs.
size();
172 int rsize = rhs.
size();
174 int rsize2 = rhs2.
size();
266 int rn = rhs2.
size();
345 s <<
"Factorizations : " << std::setw(10) <<
getFactorCount() << std::endl
346 <<
" Time spent : " << std::setw(10) << std::fixed << std::setprecision(
348 <<
"Solves : " << std::setw(10) <<
getSolveCount() << std::endl
349 <<
" Time spent : " << std::setw(10) <<
getSolveTime() << std::endl;
631 assert(old.
l.
ridx != 0);
632 assert(old.
l.
rbeg != 0);
651 assert(old.
l.
ridx == 0);
652 assert(old.
l.
rbeg == 0);
1078 FILE* fl = fopen(
"dump.lp",
"w");
1079 std::cout <<
"DSLUFA03 Basis:\n";
1082 for(i = 0; i <
dim(); ++i)
1083 j += matrix[i]->size();
1084 for(i = 0; i <
dim(); ++i)
1086 for(j = 0; j < matrix[i]->
size(); ++j)
1087 fprintf(fl,
"%8d %8d %s\n",
1088 i + 1, matrix[i]->index(j) + 1,
rationalToString(matrix[i]->value(j)).c_str());
1091 std::cout <<
"DSLUFA04 LU-Factors:" << std::endl;
1095 <<
"\tstability = " <<
stability() << std::endl;
1105 #ifdef ENABLE_CONSISTENCY_CHECKS Real lMemMult
factor of minimum Memory * number of nonzeros
int * start
starting positions in val and idx
int firstUpdate
number of first update L vector
int * ridx
indices of rows of L
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]...
void reDim(int newdim, const bool setZero=true)
Resets DVectorBase's dimension to newdim.
No matrix has yet been loaded.
Implementation of Sparse Linear Solver with Rational precision.This class implements a SLinSolverRati...
Rational * work
Working array: must always be left as 0!
Memory allocation routines.
SSVectorBase< R > & assign(const SVectorBase< S > &rhs)
Assigns only the elements of rhs.
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.
Real colMemMult
factor of minimum Memory * number of nonzeros
int firstUnused
number of first unused L vector
struct soplex::CLUFactorRational::U::Col col
int size() const
Number of used indices.
void changeEta(int idx, SSVectorRational &eta)
Exception classes for SoPlex.
int thedim
dimension of factorized matrix
Rational stability() const
int getFactorCount() const
number of factorizations performed
int * row
column indices of L vectors
DVectorRational diag
Array of pivot elements.
void unSetup()
Makes SSVectorBase not setup.
int getSolveCount() const
number of solves performed
Implementation of Sparse Linear Solver with Rational precision.
void update(int p_col, Rational *p_work, const int *p_idx, int num)
int used
used entries of arrays idx and val
void factor(const SVectorRational **vec, const Rational &threshold)
pivoting threshold
SLUFactorRational()
default constructor.
Real timeLimit
Time limit on factorization or solves.
Wrapper for GMP type mpq_class.We wrap mpq_class so that we can replace it by a double type if GMP is...
int updateType
type of updates to be used.
SSVectorRational ssvec
Temporary semi-sparse vector.
int * altIndexMem()
Returns array indices.
int vSolveLeft(Rational *vec, int *idx, Rational *rhs, int *ridx, int rn)
UpdateType uptype
the current UpdateType.
DVectorRational val
hold nonzero values: this is only initialized in the end of the factorization with DEFAULT updates...
void solveLright(Rational *vec)
void assign(const SLUFactorRational &old)
used to implement the assignment operator
Rational initMaxabs
maximum abs number in initail Matrix
Wrapper for different output streams and verbosity levels.
void solveRight(Rational *vec, Rational *rhs)
Exception class for out of memory exceptions.This class is derived from the SoPlex exception base cla...
virtual void start()=0
start timer, resume accounting user, system and real time.
virtual Real stop()=0
stop timer, return accounted user time.
void spx_alloc(T &p, int n=1)
Allocate memory.
R * altValues()
Returns array values.
Sparse Linear Solver virtual base class with Rational precision.Class SLinSolverRational provides a c...
Rational minStability
minimum stability to achieve by setting threshold.
SLinSolverRational::Status Status
for convenience
int * start
starting positions in val and idx
R * get_ptr()
Conversion to C-style pointer.
Rational minThreshold
minimum threshold to use.
int vSolveRight4update(Rational *vec, int *idx, Rational *rhs, int *ridx, int rn, Rational *forest, int *forestNum, int *forestIdx)
Real getSolveTime() const
time spent in solves
const R * values() const
Returns array values.
int vSolveLeft2(Rational *vec, int *idx, Rational *rhs, int *ridx, int rn, Rational *vec2, Rational *rhs2, int *ridx2, int rn2)
Real rowMemMult
factor of minimum Memory * number of nonzeros
void solveLeft(Rational *vec, Rational *rhs)
Rational lastThreshold
pivoting threshold of last factorization
DVectorRational val
values of L vectors
void solveRight(VectorRational &x, const VectorRational &b)
Solves .
Dring list
Double linked ringlist of vector indices in the order they appear in the row file.
void solveRight4update(SSVectorRational &x, const SVectorRational &b)
Solves .
Perm row
row permutation matrices
void clear()
Clears vector.
int * rorig
original row permutation
int solveCount
Number of solves.
SSVectorRational forest
? Update vector set up by solveRight4update() and solve2right4update()
int size
size of array idx
DVectorRational rval
values of rows of L
static Timer * createTimer(Timer::TYPE ttype)
create timers and allocate memory for them
Timer * factorTime
Time spent in factorizations.
Status load(const SVectorRational *vec[], int dim)
bool isConsistent() const
consistency check.
bool isConsistent() const
const int * indexMem() const
Returns array indices.
virtual ~SLUFactorRational()
destructor.
void reDim(int newdim)
Resets dimension to newdim.
bool usetup
TRUE iff update vector has been setup.
Debugging, floating point type and parameter definitions.
void setSize(int n)
Sets number of nonzeros (thereby unSetup SSVectorBase).
void dump() const
prints the LU factorization to stdout.
int * idx
array of size val.dim() storing indices of L vectors
R * get_ptr()
Only used in slufactor.cpp.
void spx_realloc(T &p, int n)
Change amount of allocated memory.
Real getFactorTime() const
time spent in factorizations
Status change(int idx, const SVectorRational &subst, const SSVectorRational *eta=0)
int dim() const
Dimension of vector.
void setup_and_assign(SSVectorBase< S > &rhs)
Sets up rhs vector, and assigns it.
int size() const
Returns the number of nonzeros.
Implementation of sparse LU factorization with Rational precision.This class implements a sparse LU f...
Everything should be within this namespace.
struct soplex::CLUFactorRational::U::Row row
int * perm
perm[i] permuted index from i
Timer * solveTime
Time spent in solves.
int * len
used nonzeros per column vector
int * len
used nonzeros per row vectors
std::string statistics() const
DVectorRational val
hold nonzero values
int * idx
hold row indices of nonzeros
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 clear()
Set vector to 0.
void forestUpdate(int col, Rational *work, int num, int *nonz)
Performs the Forrest-Tomlin update of the LU factorization.
void forceSetup()
Forces setup status.
void solve3right4update(SSVectorRational &x, VectorRational &y, VectorRational &z, const SVectorRational &b, SSVectorRational &d, SSVectorRational &e)
Solves , and .
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)
#define MAXUPDATES
maximum nr. of factorization updates allowed before refactorization.
SLUFactorRational & operator=(const SLUFactorRational &old)
assignment operator.
Rational maxabs
maximum abs number in L and U
Perm col
column permutation matrices
int * rperm
original row permutation
VectorBase< R > & assign(const SVectorBase< S > &vec)
Assign values of vec.
void updateNoClear(int p_col, const Rational *p_work, const int *p_idx, int num)
int * rbeg
start of rows in rval and ridx
std::string rationalToString(const Rational &r, const int precision)
convert rational number to string
Dring * elem
Array of ring elements.
int * idx
array of length val.dim() to hold column indices of nonzeros in val
void solveLeft(VectorRational &x, const VectorRational &b)
Solves .
Status
status flags of the SLinSolverRational class.
Wrapper for the system time query methods.
int * orig
orig[p] original index from p
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
void spx_free(T &p)
Release memory.
static Real betterThreshold(Real th)
void solve2right4update(SSVectorRational &x, VectorRational &y, const SVectorRational &b, SSVectorRational &d)
Solves and .
DVectorRational vec
Temporary vector.
SLinSolverRational::Status stat
Status indicator.