28#ifndef _SLUFACTOR_RATIONAL_H_
29#define _SLUFACTOR_RATIONAL_H_
42#define SOPLEX_MAXUPDATES 1000
408 assert(
l.
idx !=
nullptr);
409 assert(
l.
start !=
nullptr);
410 assert(
l.
row !=
nullptr);
515#include "slufactor_rational.hpp"
Implementation of sparse LU factorization with Rational precision.
int factorCount
Number of factorizations.
Timer * factorTime
Time spent in factorizations.
Rational * work
Working array: must always be left as 0!
Real timeLimit
Time limit on factorization or solves.
Perm col
column permutation matrices
Perm row
row permutation matrices
SLinSolverRational::Status stat
Status indicator.
VectorRational diag
Array of pivot elements.
int thedim
dimension of factorized matrix
int nzCnt
number of nonzeros in U
Implementation of Sparse Linear Solver with Rational precision.
UpdateType
Specifies how to perform change method.
SSVectorRational forest
? Update vector set up by solveRight4update() and solve2right4update()
Rational stability() const
Timer * solveTime
Time spent in solves.
virtual SLinSolverRational * clone() const
clone function for polymorphism
SLUFactorRational()
default constructor.
void assign(const SLUFactorRational &old)
used to implement the assignment operator
Real getFactorTime() const
time spent in factorizations
bool isConsistent() const
consistency check.
void changeEta(int idx, SSVectorRational &eta)
void solve3right4update(SSVectorRational &x, VectorRational &y, VectorRational &z, const SVectorRational &b, SSVectorRational &d, SSVectorRational &e)
Solves , and .
SLinSolverRational::Status Status
for convenience
void resetSolveTime()
reset SolveTime
void resetFactorTime()
reset FactorTime
UpdateType utype() const
returns the current update type uptype.
void setUtype(UpdateType tp)
sets update type.
void resetCounters()
reset timers and counters
Status change(int idx, const SVectorRational &subst, const SSVectorRational *eta=nullptr)
UpdateType uptype
the current UpdateType.
int solveCount
Number of solves.
const char * getName() const
bool usetup
TRUE iff update vector has been setup.
void solveRight4update(SSVectorRational &x, const SVectorRational &b)
Solves .
Rational markowitz()
returns Markowitz threshold.
void solveLeft(SSVectorRational &x, const SVectorRational &b)
Solves .
Rational minStability
minimum stability to achieve by setting threshold.
void setMarkowitz(const Rational &m)
sets minimum Markowitz threshold.
void solve2right4update(SSVectorRational &x, VectorRational &y, const SVectorRational &b, SSVectorRational &d)
Solves and .
virtual ~SLUFactorRational()
destructor.
void solveLeft(SSVectorRational &x, VectorRational &y, VectorRational &z, const SVectorRational &b, SSVectorRational &d, SSVectorRational &e)
Solves , and .
SLUFactorRational(const SLUFactorRational &old)
copy constructor.
void setTimeLimit(const Real limit)
set time limit on factorization
int getSolveCount() const
number of solves performed
Rational minThreshold
minimum threshold to use.
void solveRight(SSVectorRational &x, const SVectorRational &b)
Solves .
int getFactorCount() const
number of factorizations performed
VectorRational vec
Temporary vector.
Rational lastThreshold
pivoting threshold of last factorization
void solveLeft(SSVectorRational &x, VectorRational &y, const SVectorRational &b, SSVectorRational &d)
Solves and .
std::string statistics() const
SSVectorRational ssvec
Temporary semi-sparse vector.
void solveRight(VectorRational &x, const VectorRational &b)
Solves .
SLUFactorRational & operator=(const SLUFactorRational &old)
assignment operator.
Real getSolveTime() const
time spent in solves
void solveLeft(VectorRational &x, const VectorRational &b)
Solves .
void dump() const
prints the LU factorization to stdout.
Status load(const SVectorRational *vec[], int dim)
Sparse Linear Solver virtual base class with Rational precision.
Status
status flags of the SLinSolverRational class.
Exception class for out of memory exceptions.
void clear()
Clears vector.
static Timer * createTimer(Timer::TYPE ttype)
create timers and allocate memory for them
Wrapper for the system time query methods.
virtual void reset()=0
initialize timer, set timing accounts to zero.
virtual Real time() const =0
R * get_ptr()
Conversion to C-style pointer.
void reDim(int newdim, const bool setZero=true)
Resets VectorBase's dimension to newdim.
int dim() const
Dimension of vector.
void clear()
Set vector to contain all-zeros (keeping the same length)
Implementation of sparse LU factorization with Rational precision.
Everything should be within this namespace.
number< gmp_rational, et_off > Rational
void spx_alloc(T &p, int n=1)
Allocate memory.
Sparse Linear Solver virtual base class with Rational precision.
Debugging, floating point type and parameter definitions.
VectorRational rval
values of rows of L
int * rorig
original row permutation
int * row
column indices of L vectors
int startSize
size of array start
int * ridx
indices of rows of L
int * rbeg
start of rows in rval and ridx
int * rperm
original row permutation
int * idx
array of size val.dim() storing indices of L vectors
VectorRational val
values of L vectors
int firstUpdate
number of first update L vector
int * start
starting positions in val and idx
int firstUnused
number of first unused L vector
int * orig
orig[p] original index from p
int * perm
perm[i] permuted index from i
int * max
maximum available nonzeros per colunn: start[i] + max[i] == start[elem[i].next->idx] len[i] <= max[i]...
int * len
used nonzeros per column vector
int size
size of array idx
int used
used entries of array idx
Dring * elem
Array of ring elements.
Dring list
Double linked ringlist of vector indices in the order they appear in the column file
int * idx
hold row indices of nonzeros
VectorRational val
hold nonzero values: this is only initialized in the end of the factorization with DEFAULT updates.
int * start
starting positions in val and idx
int * max
maximum available nonzeros per row: start[i] + max[i] == start[elem[i].next->idx] len[i] <= max[i].
int * len
used nonzeros per row vectors
int used
used entries of arrays idx and val
Dring * elem
Array of ring elements.
Dring list
Double linked ringlist of vector indices in the order they appear in the row file
int * idx
array of length val.dim() to hold column indices of nonzeros in val
VectorRational val
hold nonzero values
int * start
starting positions in val and idx
struct soplex::CLUFactorRational::U::Col col
struct soplex::CLUFactorRational::U::Row row