13 #ifndef CoinDenseFactorization_H 14 #define CoinDenseFactorization_H 22 #if COIN_FACTORIZATION_DENSE_CODE == 2 23 #undef COIN_FACTORIZATION_DENSE_CODE 49 inline int status ( )
const {
100 #ifndef COIN_FAST_CODE 147 virtual int *
indices()
const = 0;
150 virtual int *
permute()
const = 0;
169 virtual int factor ( ) = 0;
171 virtual void postProcess(
const int * sequence,
int * pivotVariable) = 0;
189 bool checkBeforeModifying=
false,
190 double acceptablePivot=1.0e-8)=0;
204 bool noPermute=
false) = 0;
209 bool noPermute=
false)
const = 0;
214 bool noPermute=
false) = 0;
232 #ifndef COIN_FAST_CODE 237 #define slackValue_ -1.0 286 friend void CoinDenseFactorizationUnitTest(
const std::string & mpsDir );
322 virtual void postProcess(
const int * sequence,
int * pivotVariable);
334 double maximumCoefficient()
const;
350 bool checkBeforeModifying=
false,
351 double acceptablePivot=1.0e-8);
371 bool noPermute=
false)
const;
376 bool noPermute=
false);
391 { gutsOfDestructor();}
401 void gutsOfDestructor();
403 void gutsOfInitialize();
411 int checkPivot(
double saveFromU,
double oldPivot)
const;
virtual int * intWorkArea() const
Returns int work area.
virtual int updateColumnFT(CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2, bool noPermute=false)=0
Updates one column (FTRAN) from regionSparse2 Tries to do FT update number returned is negative if no...
void setNumberRows(int value)
Set number of Rows after factorization.
virtual int updateColumn(CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2, bool noPermute=false) const =0
This version has same effect as above with FTUpdate==false so number returned is always >=0...
Abstract base class which also has some scalars so can be used from Dense or Simp.
int numberPivots_
Number pivots since last factorization.
virtual int * indices() const
Returns array to put basis indices in.
virtual int * indices() const =0
Returns array to put basis indices in.
int status_
Status of factorization.
virtual CoinBigIndex * starts() const
Returns array to put basis starts in.
int numberRows_
Number of Rows in factorization.
virtual int numberElements() const =0
Total number of elements in factorization.
virtual int updateColumnFT(CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2, bool=false)
Updates one column (FTRAN) from regionSparse2 Tries to do FT update number returned is negative if no...
virtual void postProcess(const int *sequence, int *pivotVariable)=0
Does post processing on valid factorization - putting variables on correct rows.
int numberRows() const
Number of Rows after factorization.
int numberGoodU_
Number factorized in U (not row singletons)
CoinBigIndex maximumSpace_
Maximum length of iterating area.
int numberGoodColumns() const
Number of good columns in factorization.
double slackValue() const
Whether slack value is +1 or -1.
virtual void preProcess()=0
PreProcesses column ordered copy of basis.
int maximumPivots_
Maximum number of pivots before factorization.
double slackValue_
Whether slack value is +1 or -1.
virtual void clearArrays()
Get rid of all memory.
virtual void makeNonSingular(int *sequence, int numberColumns)=0
Makes a non-singular basis by replacing variables.
double getAccuracyCheck() const
int maximumRows_
Maximum rows ever (i.e. use to copy arrays etc)
int maximumPivots() const
Maximum number of pivots between factorizations.
CoinFactorizationDouble * elements_
Elements of factorization and updates length is maxR*maxR+maxSpace will always be long enough so can ...
double CoinFactorizationDouble
virtual int * numberInColumn() const
Number of entries in each column.
double zeroTolerance_
Zero tolerance.
virtual int * permuteBack() const
Returns permute back.
virtual CoinFactorizationDouble * elements() const
Returns array to put basis elements in.
int numberColumns() const
Total number of columns in factorization.
double zeroTolerance() const
Zero tolerance.
void setSolveMode(int value)
Set solve mode e.g.
virtual int * permute() const =0
Returns permute in.
virtual bool wantsTableauColumn() const
Returns true if wants tableauColumn in replaceColumn.
CoinFactorizationDouble * workArea_
Work area of numberRows_.
int solveMode() const
Get solve mode e.g.
void setStatus(int value)
Sets status.
virtual int * numberInRow() const
Number of entries in each row.
CoinOtherFactorization()
Default constructor.
This deals with Factorization and Updates This is a simple dense version so other people can write a ...
int status() const
Returns status.
virtual void getAreas(int numberRows, int numberColumns, CoinBigIndex maximumL, CoinBigIndex maximumU)=0
Gets space for a factorization.
Sparse Matrix Base Class.
CoinBigIndex factorElements_
Number of elements after factorization.
virtual int factor()=0
Does most of factorization returning status 0 - OK -99 - needs more memory -1 - singular - use number...
virtual int replaceColumn(CoinIndexedVector *regionSparse, int pivotRow, double pivotCheck, bool checkBeforeModifying=false, double acceptablePivot=1.0e-8)=0
Replaces one Column to basis, returns 0=OK, 1=Probably OK, 2=singular, 3=no room If checkBeforeModify...
double pivotTolerance() const
Pivot tolerance.
double relaxCheck_
Relax check on accuracy in replaceColumn.
virtual int updateTwoColumnsFT(CoinIndexedVector *regionSparse1, CoinIndexedVector *regionSparse2, CoinIndexedVector *regionSparse3, bool noPermute=false)=0
does FTRAN on two columns
virtual ~CoinOtherFactorization()
Destructor.
void setPivots(int value)
Sets number of pivots since factorization.
virtual CoinFactorizationDouble * workArea() const
Returns work area.
double pivotTolerance_
Pivot tolerance.
int * pivotRow_
Pivot row.
virtual int * pivotRow() const
Returns pivot row.
int solveMode_
Solve mode e.g.
virtual int * permute() const
Returns permute in.
int pivots() const
Returns number of pivots since factorization.
int numberColumns_
Number of Columns in factorization.
void relaxAccuracyCheck(double value)
Allows change of pivot accuracy check 1.0 == none >1.0 relaxed.
virtual void setUsefulInformation(const int *info, int whereFrom)
Useful information for factorization 0 - iteration number whereFrom is 0 for factorize and 1 for repl...
virtual CoinOtherFactorization * clone() const =0
Clone.
virtual int updateColumnTranspose(CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2) const =0
Updates one column (BTRAN) from regionSparse2 regionSparse starts as zero and is zero at end Note - i...
CoinOtherFactorization & operator=(const CoinOtherFactorization &other)
= copy