Go to the documentation of this file.
25 #define LARGE_SET COIN_INT_MAX - 10
26 #define LARGE_UNSET (LARGE_SET + 1)
135 #define ABC_USE_FUNCTION_POINTERS 0
136 #define SMALL_PERMUTE
138 #ifdef ABC_USE_FUNCTION_POINTERS
139 typedef void (*
scatterUpdate)(int, CoinFactorizationDouble,
const CoinFactorizationDouble *, CoinFactorizationDouble *);
140 #if ABC_USE_FUNCTION_POINTERS
155 return scatterPointersUColumnAddress_;
237 inline bool forrestTomlin()
const
239 {
return doForrestTomlin_;}
240 inline void setForrestTomlin(
bool value)
241 { doForrestTomlin_=value;}
297 virtual inline CoinBigIndex *
starts()
const
312 virtual inline CoinFactorizationDouble *
elements()
const
336 #if COIN_BIG_DOUBLE == 1
337 void toLongArray(CoinIndexedVector *vector,
int which)
const;
344 long double *
denseVector(CoinIndexedVector *vector)
const;
346 long double *
denseVector(CoinIndexedVector &vector)
const;
348 const long double *
denseVector(
const CoinIndexedVector *vector)
const;
350 const long double *
denseVector(
const CoinIndexedVector &vector)
const;
352 void scan(CoinIndexedVector *vector)
const;
354 void clearHiddenArrays();
356 inline double *
denseVector(CoinIndexedVector *vector)
const
359 return vector->denseVector();
363 return vector.denseVector();
366 inline const double *
denseVector(
const CoinIndexedVector *vector)
const
368 return vector->denseVector();
370 inline const double *
denseVector(
const CoinIndexedVector &vector)
const
372 return vector.denseVector();
375 inline void toLongArray(CoinIndexedVector *vector,
int which)
const {}
381 inline void scan(CoinIndexedVector *vector)
const
386 #ifdef ABC_ORDERED_FACTORIZATION
387 void permuteInForFtran(CoinIndexedVector ®ionSparse,
bool full =
false)
const;
390 void permuteInForBtranAndMultiply(CoinIndexedVector ®ionSparse,
bool full =
false)
const;
392 void permuteOutForBtran(CoinIndexedVector ®ionSparse)
const;
410 virtual int checkReplace (
const AbcSimplex * model,
411 CoinIndexedVector * regionSparse,
414 double acceptablePivot = 1.0e-8);
419 virtual CoinSimplexInt replaceColumn ( CoinIndexedVector * regionSparse,
422 bool skipBtranU=
false,
430 #ifdef ABC_LONG_FACTORIZATION
441 #ifdef ABC_LONG_FACTORIZATION
446 CoinIndexedVector *partialUpdate,
448 #ifdef MOVE_REPLACE_PART1A
456 #ifdef ABC_LONG_FACTORIZATION
468 #ifdef ABC_LONG_FACTORIZATION
472 double acceptablePivot = 1.0e-8);
476 CoinIndexedVector *regionSparse,
477 CoinIndexedVector *tableauColumn,
479 #ifdef ABC_LONG_FACTORIZATION
486 CoinIndexedVector *regionSparse,
487 CoinIndexedVector *tableauColumn,
488 CoinIndexedVector *partialUpdate,
490 #ifdef ABC_LONG_FACTORIZATION
494 #ifdef EARLY_FACTORIZE
495 virtual int replaceColumns(
const AbcSimplex *model,
497 CoinIndexedVector &stuff,
498 int firstPivot,
int lastPivot,
bool cleanUp);
511 CoinBigIndex *deletedPosition,
533 CoinIndexedVector &partialUpdate,
544 CoinIndexedVector ®ionOther);
555 virtual void updateWeights(CoinIndexedVector ®ionSparse)
const;
557 virtual void updateColumnCpu(CoinIndexedVector ®ionSparse,
int whichCpu)
const;
560 void unpack(CoinIndexedVector *regionFrom,
561 CoinIndexedVector *regionTo)
const;
562 void pack(CoinIndexedVector *regionFrom,
563 CoinIndexedVector *regionTo)
const;
602 void printRegion(
const CoinIndexedVector &vector,
const char *where)
const;
610 CoinBigIndex maximumL,
611 CoinBigIndex maximumU);
621 #ifdef EARLY_FACTORIZE
622 virtual int factorize(
AbcSimplex *model, CoinIndexedVector &stuff);
691 #define checkLinks(x)
713 assert(next != index);
714 assert(last != index);
722 firstCount[count] = next;
737 assert(next != index);
738 assert(last != index);
799 CoinIndexedVector *regionFT);
914 CoinBigIndex pivotRowPosition,
915 CoinBigIndex pivotColumnPosition,
922 CoinBigIndex pivotRowPosition,
923 CoinBigIndex pivotColumnPosition,
929 #undef ABC_DENSE_CODE
930 #define ABC_DENSE_CODE 0
945 #ifdef ABC_USE_FUNCTION_POINTERS
948 CoinFactorizationDouble *elementUColumnPlusAddress_;
1045 #ifdef ABC_USE_FUNCTION_POINTERS
1046 CoinBigIndex lastEntryByColumnUPlus_;
1049 CoinBigIndex lengthAreaUPlus_;
1059 #if COIN_BIG_DOUBLE == 1
1060 mutable CoinFactorizationLongDoubleArrayWithLength longArray_[
FACTOR_CPU];
1063 mutable CoinIndexedVector *associatedVector_[
FACTOR_CPU];
1102 #ifdef ABC_USE_FUNCTION_POINTERS
1103 CoinArbitraryArrayWithLength scatterUColumn_;
1118 CoinFactorizationDoubleArrayWithLength
elementL_;
1125 CoinFactorizationDoubleArrayWithLength
denseArea_;
1128 CoinFactorizationDoubleArrayWithLength
workArea_;
1157 #if FACTORIZATION_STATISTICS
1158 double ftranTwiddleFactor1_;
1159 double ftranTwiddleFactor2_;
1173 #if FACTORIZATION_STATISTICS
1174 double ftranFTTwiddleFactor1_;
1175 double ftranFTTwiddleFactor2_;
1191 #if FACTORIZATION_STATISTICS
1192 double btranTwiddleFactor1_;
1193 double btranTwiddleFactor2_;
1208 #if FACTORIZATION_STATISTICS
1209 double ftranFullTwiddleFactor1_;
1210 double ftranFullTwiddleFactor2_;
1225 #if FACTORIZATION_STATISTICS
1226 double btranFullTwiddleFactor1_;
1227 double btranFullTwiddleFactor2_;
1261 inline bool gotLCopy()
const {
return true; }
1264 inline bool gotRCopy()
const {
return true; }
1267 inline bool gotUCopy()
const {
return true; }
1270 inline bool gotSparse()
const {
return true; }
1276 inline bool gotLCopy()
const {
return false; }
1279 inline bool gotRCopy()
const {
return false; }
1282 inline bool gotUCopy()
const {
return false; }
1285 inline bool gotSparse()
const {
return false; }
CoinBigIndexArrayWithLength startRowL_
Start of each row in L.
CoinSimplexInt * pivotLinkedForwards() const
void updateColumnTransposeLSparse(CoinIndexedVector *region) const
Updates part of column transpose (BTRANL) when sparse (by Row)
virtual CoinSimplexInt * indices() const
Returns array to put basis indices in.
void pack(CoinIndexedVector *regionFrom, CoinIndexedVector *regionTo) const
CoinIntArrayWithLength numberInRow_
Number in each Row.
void scan(CoinIndexedVector *vector) const
Scans region to find nonzeros.
void updateColumnTransposeU(CoinIndexedVector *region, CoinSimplexInt smallestIndex, CoinAbcStatistics &statistics) const
Updates part of column transpose (BTRANU), assumes index is sorted i.e.
CoinBigIndex lengthR_
Length of R stuff.
void updateColumnLSparse(CoinIndexedVector *region) const
Updates part of column (FTRANL) when sparse.
CoinIntArrayWithLength indexColumnL_
Index of column in row for L.
CoinSimplexInt numberFtranFTCounts_
double ftranFullCountAfterU_
CoinBigIndex numberCompressions() const
Number of compressions done.
CoinSimplexInt * pivotLinkedForwardsAddress_
CoinIntArrayWithLength markRow_
Marks rows to be updated.
Abstract base class which also has some scalars so can be used from Dense or Simp.
CoinIntArrayWithLength nextColumn_
Next Column in memory order.
int numberRows() const
Number of Rows after factorization.
CoinBigIndex * startRowLAddress_
CoinSimplexInt * pivotLinkedBackwardsAddress_
double btranAverageAfterR_
double preProcess3()
Return largest element.
CoinIntArrayWithLength indexColumnU_
Base address for U (may change)
virtual double checkReplacePart1(CoinIndexedVector *regionSparse, int pivotRow)
Checks if can replace one Column to basis, returns update alpha Fills in region for use later partial...
virtual void postProcess(const CoinSimplexInt *sequence, CoinSimplexInt *pivotVariable)
Does post processing on valid factorization - putting variables on correct rows.
CoinSimplexInt * firstCountAddress_
CoinSimplexInt numberFtranFullCounts_
CoinFactorizationDouble * elementU() const
Elements of U.
CoinFactorizationDoubleArrayWithLength pivotRegion_
Inverses of pivot values.
CoinBigIndex numberElementsR() const
Returns number in R area.
CoinSimplexInt * indexColumnLAddress_
CoinSimplexInt checkPivot(CoinSimplexDouble saveFromU, CoinSimplexDouble oldPivot) const
Returns accuracy status of replaceColumn returns 0=OK, 1=Probably OK, 2=singular.
CoinSimplexInt numberTrials_
Number of trials before rejection.
double btranFullAverageAfterL_
CoinSimplexInt * saveColumnAddress_
CoinAbcTypeFactorization()
Default constructor.
CoinSimplexInt numberRowsExtra() const
Number of Rows after iterating.
double ftranFTCountInput_
CoinSimplexInt numberRowsLeft_
Number Rows left (numberRows-numberGood)
virtual int checkReplacePart2(int pivotRow, CoinSimplexDouble btranAlpha, double ftranAlpha, double ftAlpha, double acceptablePivot=1.0e-8)
Checks if can replace one Column to basis, returns 0=OK, 1=Probably OK, 2=singular,...
virtual void preProcess()
PreProcesses column ordered copy of basis.
CoinFactorizationDoubleArrayWithLength elementByRowL_
Elements in L (row copy)
CoinSimplexInt numberBtranFullCounts_
CoinBigIndex lengthL_
Length of L.
double btranFullCountInput_
To decide how to solve.
CoinFactorizationDoubleArrayWithLength elementL_
Elements of L.
CoinIntArrayWithLength lastColumn_
Previous Column in memory order.
virtual void replaceColumnPart3(const AbcSimplex *model, CoinIndexedVector *regionSparse, CoinIndexedVector *tableauColumn, int pivotRow, double alpha)
Replaces one Column to basis, partial update already in U.
CoinSimplexInt * permuteAddress_
void(* scatterUpdate)(int, CoinFactorizationDouble, const CoinFactorizationDouble *, double *) SCATTER_ATTRIBUTE
CoinSimplexInt sparseThreshold_
Below this use sparse technology - if 0 then no L row copy.
CoinSimplexInt * indexColumnL() const
Index of column in row for L.
void updateColumnU(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column (FTRANU)
CoinSimplexInt messageLevel_
Detail in messages.
void updatePartialUpdate(CoinIndexedVector &partialUpdate)
Update partial Ftran by R update.
CoinSimplexInt numberGoodL_
Number factorized in L.
int wantToGoDense()
After pivoting - returns true if need to go dense.
double ftranFullAverageAfterL_
CoinSimplexInt numberForrestTomlin() const
Length of FT vector.
CoinSimplexInt lastSlack_
double ftranFullCountAfterL_
CoinSimplexInt numberRowsSmall_
Size of small inverse.
double ftranCountInput_
To decide how to solve.
void toLongArray(CoinIndexedVector *vector, int which) const
To a work array and associate vector.
CoinBigIndex totalElements_
Number of elements in U (to go) or while iterating total overall.
void updateColumnTransposeUDensish(CoinIndexedVector *region, CoinSimplexInt smallestIndex) const
Updates part of column transpose (BTRANU) when densish, assumes index is sorted i....
CoinBigIndex * startColumnUAddress_
void updateColumnUDense(CoinIndexedVector *regionSparse) const
Updates part of column (FTRANU) when dense (i.e. do as inner products)
CoinSimplexInt * lastCountAddress_
Previous Row/Column with count.
CoinSimplexInt maximumRowsExtra() const
Maximum of Rows after iterating.
double btranFullAverageAfterR_
double ftranFTAverageAfterL_
CoinCheckZero * markRowAddress_
void show_self() const
Debug show object (shows one representation)
double ftranFTAverageAfterR_
#define FACTOR_CPU
This deals with Factorization and Updates.
const double * denseVector(const CoinIndexedVector &vector) const
CoinBigIndex * startColumnL() const
Start of each column in L.
CoinSimplexInt * nextCountAddress_
Next Row/Column with count.
virtual CoinSimplexInt updateTwoColumnsFT(CoinIndexedVector ®ionFT, CoinIndexedVector ®ionOther)
Updates one column (FTRAN) from region2 Tries to do FT update number returned is negative if no room.
void fromLongArray(int which) const
From a work array and dis-associate vector.
virtual void updateColumnTransposeCpu(CoinIndexedVector ®ionSparse, int whichCpu) const
Updates one column (BTRAN)
CoinFactorizationDouble * elementRAddress_
Elements of R.
CoinSimplexInt * listAddress_
bool getRowSpaceIterate(CoinSimplexInt iRow, CoinSimplexInt extraNeeded)
Gets space for one Row with given length while iterating, may have to do compression (returns True if...
CoinBigIndex lengthAreaR_
length of area reserved for R
void checkConsistency()
Checks that row and column copies look OK.
void updateColumnTransposeLDensish(CoinIndexedVector *region) const
Updates part of column transpose (BTRANL) when densish by column.
CoinSimplexInt numberR_
Number in R.
virtual CoinBigIndex numberElements() const
Total number of elements in factorization.
CoinSimplexInt * nextRowAddress_
void doAddresses()
Set up addresses from arrays.
CoinSimplexInt maximumRowsExtra_
Maximum number of Rows after iterating.
CoinFactorizationDouble * elementByRowL() const
Elements in L (row copy)
CoinBigIndex lastEntryByRowU_
Last entry by row for U.
CoinFactorizationDouble * elementByRowLAddress_
int replaceColumnU(CoinIndexedVector *regionSparse, CoinBigIndex *deletedPosition, CoinSimplexInt *deletedColumns, CoinSimplexInt pivotRow)
Combines BtranU and store which elements are to be deleted returns number to be deleted.
CoinBigIndex * startRowL() const
Start of each row in L.
CoinSimplexInt * indexRowU() const
Row indices of U.
void updateColumnTransposeLByRow(CoinIndexedVector *region) const
Updates part of column transpose (BTRANL) when densish by row.
CoinFactorizationDouble * elementUAddress_
CoinBigIndex lengthAreaL() const
Returns length of L area.
CoinBigIndex firstZeroed_
First place in funny copy zeroed out.
CoinIntArrayWithLength numberInColumn_
Number in each Column.
void updateColumnTransposeUByColumn(CoinIndexedVector *region, CoinSimplexInt smallestIndex) const
Updates part of column transpose (BTRANU) by column assumes index is sorted i.e.
double ftranFTAverageAfterU_
CoinSimplexInt * pivotLinkedBackwards() const
Forward and backward linked lists (numberRows_+2)
virtual void updateWeights(CoinIndexedVector ®ionSparse) const
Updates one column for dual steepest edge weights (FTRAN)
void updateColumnTransposePFI(CoinIndexedVector *region) const
Updates part of column transpose PFI (BTRAN) (before rest)
CoinSimplexInt * indexRowUAddress_
CoinSimplexInt maximumMaximumPivots_
Maximum maximum pivots.
CoinBigIndex * convertColumnToRowUAddress_
CoinBigIndexArrayWithLength startRowU_
Start of each Row as pointer.
void resetStatistics()
Reset all sparsity etc statistics.
void gutsOfDestructor(CoinSimplexInt type=1)
The real work of constructors etc 0 just scalars, 1 bit normal.
void updateColumnL(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column (FTRANL)
CoinSimplexInt factorSparse()
Does sparse phase of factorization return code is <0 error, 0= finished.
double ftranFullCountInput_
To decide how to solve.
virtual CoinFactorizationDouble * elements() const
Returns array to put basis elements in.
double btranFullCountAfterR_
virtual CoinSimplexInt * pivotColumn() const
Returns address of pivotColumn region (also used for permuting)
virtual int updateColumnFTPart1(CoinIndexedVector ®ionSparse)
void separateLinks()
Separate out links with same row/column count.
CoinSimplexDouble conditionNumber() const
Condition number - product of pivots after factorization.
void almostDestructor()
Delete all stuff (leaves as after CoinAbcFactorization())
CoinSimplexUnsignedInt * workArea2Address_
bool getColumnSpace(CoinSimplexInt iColumn, CoinSimplexInt extraNeeded)
Gets space for one Column with given length, may have to do compression (returns True if successful),...
void updateColumnTransposeL(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column transpose (BTRANL)
double btranAverageAfterL_
CoinSimplexInt leadingDimension_
Leading dimension for dense.
CoinBigIndex lengthAreaU_
Length of area reserved for U.
CoinBigIndex lengthAreaL_
Length of area reserved for L.
CoinIntArrayWithLength permute_
Permutation vector for pivot row order.
virtual CoinSimplexInt updateColumn(CoinIndexedVector ®ionSparse) const
This version has same effect as above with FTUpdate==false so number returned is always >=0.
CoinSimplexInt * permute() const
Returns address of permute region.
unsigned int CoinSimplexUnsignedInt
void unpack(CoinIndexedVector *regionFrom, CoinIndexedVector *regionTo) const
void updateColumnTransposeRDensish(CoinIndexedVector *region) const
Updates part of column transpose (BTRANR) when dense.
virtual void updateFullColumnTranspose(CoinIndexedVector ®ionSparse) const
Updates one full column (BTRAN)
CoinFactorizationDoubleArrayWithLength elementRowU_
Elements of U by row.
CoinSimplexInt * lastColumnAddress_
CoinSimplexInt * indexRowRAddress_
Row indices for R.
CoinBigIndex * startColumnU() const
Start of each column in U.
void afterPivot(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
After pivoting.
virtual bool wantsTableauColumn() const
Returns true if wants tableauColumn in replaceColumn.
virtual CoinSimplexInt factor(AbcSimplex *model)
Does most of factorization.
CoinSimplexInt factorDense()
Does dense phase of factorization return code is <0 error, 0= finished.
#define ABC_FAC_GOT_UCOPY
virtual CoinBigIndex * starts() const
Returns pivot row.
CoinSimplexInt maximumRows_
Maximum rows (ever) (here to use double alignment)
CoinFactorizationDouble * pivotRegionAddress_
const double * denseVector(const CoinIndexedVector *vector) const
Returns double * associated with vector.
CoinSimplexInt numberRowsExtra_
Number of Rows after iterating.
CoinSimplexInt * indexColumnUAddress_
CoinIntArrayWithLength nextRow_
Next Row in memory order.
bool pivotRowSingleton(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
Does one pivot on Row Singleton in factorization.
void updateColumnLDense(CoinIndexedVector *region) const
Updates part of column (FTRANL) when dense (i.e. do as inner products)
void updateColumnPFI(CoinIndexedVector *regionSparse) const
Updates part of column PFI (FTRAN) (after rest)
void updateColumnR(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column (FTRANR) without FT update.
void gutsOfInitialize(CoinSimplexInt type)
1 bit - tolerances etc, 2 more, 4 dummy arrays
CoinIntArrayWithLength pivotColumn_
Pivot order for each Column.
virtual void updateColumnFTPart2(CoinIndexedVector ®ionSparse)
void modifyLink(CoinSimplexInt index, CoinSimplexInt count)
Modifies links in chain of equal counts.
CoinFactorizationDoubleArrayWithLength denseArea_
Dense area.
double ftranFullAverageAfterR_
double ftranFTCountAfterL_
double btranFullCountAfterL_
double ftranAverageAfterR_
void updateColumnLDensish(CoinIndexedVector *region) const
Updates part of column (FTRANL) when densish.
CoinSimplexInt initialNumberRows_
Rows first time nonzero.
CoinBigIndex numberElementsL() const
Returns number in L area.
unsigned char CoinCheckZero
CoinBigIndex lastEntryByColumnU_
Last entry by column for U.
CoinSimplexInt replaceColumnPFI(CoinIndexedVector *regionSparse, CoinSimplexInt pivotRow, CoinSimplexDouble alpha)
Replaces one Column to basis for PFI returns 0=OK, 1=Probably OK, 2=singular, 3=no room.
virtual CoinFactorizationDouble * pivotRegion() const
Returns address of pivot region.
CoinAbcTypeFactorization & operator=(const CoinAbcTypeFactorization &other)
= copy
bool getColumnSpaceIterateR(CoinSimplexInt iColumn, CoinFactorizationDouble value, CoinSimplexInt iRow)
getColumnSpaceIterateR.
CoinSimplexInt * nextColumnAddress_
virtual void checkMarkArrays() const
#define ABC_FAC_GOT_LCOPY
void setDenseThreshold(CoinSimplexInt value)
Sets dense threshold.
double ftranAverageAfterU_
CoinSimplexInt * sparseAddress_
CoinSimplexInt state_
State of saved version and what can be done 0 - nothing saved 1 - saved and can go back to previous s...
double ftranFTCountAfterU_
void clearArrays()
Get rid of all memory.
CoinBigIndexArrayWithLength convertRowToColumnU_
Converts rows to columns in U.
CoinBigIndexArrayWithLength startColumnL_
Start of each column in L.
CoinSimplexDouble adjustedAreaFactor() const
Returns areaFactor but adjusted for dense.
virtual CoinSimplexInt * numberInRow() const
Number of entries in each row.
CoinSimplexInt * pivotColumnAddress_
CoinBigIndex numberL() const
Number in L.
void updateColumnTransposeR(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column transpose (BTRANR)
double * denseVector(CoinIndexedVector *vector) const
Returns double * associated with vector.
virtual CoinSimplexInt updateColumnTranspose(CoinIndexedVector ®ionSparse) const
Updates one column (BTRAN) from regionSparse2 regionSparse starts as zero and is zero at end Note - i...
virtual CoinSimplexInt * numberInColumn() const
Number of entries in each column.
CoinIntArrayWithLength saveColumn_
Columns left to do in a single pivot.
CoinSimplexInt * nextCount() const
Next Row/Column with count.
CoinSimplexInt * indexRowL() const
Row indices of L.
CoinFactorizationDouble * workAreaAddress_
CoinSimplexInt denseThreshold() const
Gets dense threshold.
bool storeFT(const CoinIndexedVector *regionFT)
Store update after doing L and R - retuns false if no room.
double ftranFTCountAfterR_
CoinFactorizationDouble * elementLAddress_
bool reorderU()
Reorders U so contiguous and in order (if there is space) Returns true if it could.
friend void CoinAbcFactorizationUnitTest(const std::string &mpsDir)
CoinSimplexInt sparseThreshold() const
get sparse threshold
double btranFullAverageAfterU_
CoinFactorizationDoubleArrayWithLength elementU_
Elements of U.
bool pivotOneOtherRow(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
Pivots when just one other row so faster?
double zeroTolerance_
Zero tolerance.
CoinSimplexInt numberFtranCounts_
CoinUnsignedIntArrayWithLength workArea2_
Second work area.
void goSparse()
makes a row copy of L for speed and to allow very sparse problems
void addLink(CoinSimplexInt index, CoinSimplexInt count)
Adds a link in chain of equal counts.
CoinFactorizationDoubleArrayWithLength workArea_
First work area.
bool getRowSpace(CoinSimplexInt iRow, CoinSimplexInt extraNeeded)
Gets space for one Row with given length, may have to do compression (returns True if successful),...
CoinSimplexInt * indexRowLAddress_
CoinFactorizationDouble * elementRowUAddress_
int maximumPivots() const
Maximum number of pivots between factorizations.
void updateColumnTransposeRSparse(CoinIndexedVector *region) const
Updates part of column transpose (BTRANR) when sparse.
void deleteLink(CoinSimplexInt index)
Deletes a link in chain of equal counts.
CoinBigIndex getColumnSpaceIterate(CoinSimplexInt iColumn, CoinFactorizationDouble value, CoinSimplexInt iRow)
getColumnSpaceIterate.
virtual ~CoinAbcTypeFactorization()
Destructor.
CoinSimplexInt * lastRowAddress_
CoinBigIndex numberElementsU() const
Returns number in U area.
CoinBigIndex * startColumnRAddress_
CoinIntArrayWithLength indexRowL_
Row indices of L.
int pivot(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn, CoinBigIndex pivotRowPosition, CoinBigIndex pivotColumnPosition, CoinFactorizationDouble *COIN_RESTRICT work, CoinSimplexUnsignedInt *COIN_RESTRICT workArea2, CoinSimplexInt increment2, int *COIN_RESTRICT markRow)
0 fine, -99 singular, 2 dense
CoinBigIndexArrayWithLength startColumnU_
Start of each column in U.
#define ABC_FAC_GOT_SPARSE
void checkSparse()
See if worth going sparse.
void gutsOfCopy(const CoinAbcTypeFactorization &other)
void updateColumnTransposeUSparse(CoinIndexedVector *region) const
Updates part of column transpose (BTRANU) when sparse, assumes index is sorted i.e.
void pivotColumnSingleton(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
Does one pivot on Column Singleton in factorization (can't return false)
CoinIntArrayWithLength lastRow_
Previous Row in memory order.
CoinBigIndex maximumU_
Maximum space used in U.
CoinBigIndex numberL_
Number in L.
void updateColumnUDensish(CoinIndexedVector *regionSparse) const
Updates part of column (FTRANU)
bool spaceForForrestTomlin() const
True if FT update and space.
CoinBigIndex sizeSparseArray_
Size in bytes of a sparseArray.
CoinSimplexInt * numberInRowAddress_
virtual void updateFullColumn(CoinIndexedVector ®ionSparse) const
Updates one full column (FTRAN)
CoinSimplexInt denseThreshold_
Dense threshold (here to use double alignment)
CoinIntArrayWithLength numberInColumnPlus_
Number in each Column including pivoted.
void setNumberElementsU(CoinBigIndex value)
Setss number in U area.
CoinBigIndex * startColumnLAddress_
void sort() const
Debug - sort so can compare.
void fromLongArray(CoinIndexedVector *vector) const
From a work array and dis-associate vector.
virtual CoinAbcAnyFactorization * clone() const
Clone.
virtual void checkReplacePart1a(CoinIndexedVector *, int)
int numberRows_
Number of Rows in factorization.
CoinSimplexInt * firstCount() const
For equal counts in factorization.
double btranFullCountAfterU_
double ftranAverageAfterL_
double ftranFullAverageAfterU_
void cleanup()
Cleans up at end of factorization.
CoinBigIndex lengthU_
Length of U.
double * denseVector(CoinIndexedVector &vector) const
CoinIntArrayWithLength sparse_
Sparse regions.
CoinSimplexInt * lastCount() const
Previous Row/Column with count.
CoinSimplexDouble maximumCoefficient() const
Returns maximum absolute value in factorization.
double btranAverageAfterU_
CoinSimplexInt * pivotLOrderAddress_
CoinBigIndex numberCompressions_
Number of compressions done.
CoinBigIndex lengthAreaU() const
Returns length of U area.
CoinBigIndex * convertRowToColumnUAddress_
CoinSimplexInt * pivotLOrder() const
virtual void makeNonSingular(CoinSimplexInt *sequence)
Makes a non-singular basis by replacing variables.
virtual CoinSimplexInt updateColumnFT(CoinIndexedVector ®ionSparse)
Later take out return codes (apart from +- 1 on FT)
CoinBigIndex * startRowUAddress_
CoinBigIndex * startColumnR() const
Start of columns for R.
CoinBigIndex baseL_
Base of L.
double ftranFullCountAfterR_
CoinIntArrayWithLength indexRowU_
Row indices of U.
#define ABC_FAC_GOT_RCOPY
virtual void updateColumnCpu(CoinIndexedVector ®ionSparse, int whichCpu) const
Updates one column (FTRAN)
void updateColumnUSparse(CoinIndexedVector *regionSparse) const
Updates part of column (FTRANU) when sparse.
void updateTwoColumnsUDensish(CoinSimplexInt &numberNonZero1, CoinFactorizationDouble *COIN_RESTRICT region1, CoinSimplexInt *COIN_RESTRICT index1, CoinSimplexInt &numberNonZero2, CoinFactorizationDouble *COIN_RESTRICT region2, CoinSimplexInt *COIN_RESTRICT index2) const
Updates part of 2 columns (FTRANU) real work.
void printRegion(const CoinIndexedVector &vector, const char *where) const
CoinIntArrayWithLength firstCount_
First Row/Column with count of k, can tell which by offset - Rows then Columns.
CoinSimplexInt numberBtranCounts_
CoinSimplexInt * numberInColumnAddress_
virtual double checkReplacePart1b(CoinIndexedVector *, int)
CoinSimplexInt * numberInColumnPlusAddress_
CoinSimplexInt numberU_
Number in U.
CoinBigIndex baseL() const
Base of L.
CoinFactorizationDouble * denseAreaAddress_
CoinSimplexInt messageLevel() const
Level of detail of messages.
virtual int * pivotRow() const
Returns pivot row.
virtual void getAreas(CoinSimplexInt numberRows, CoinSimplexInt numberColumns, CoinBigIndex maximumL, CoinBigIndex maximumU)
Gets space for a factorization, called by constructors.
CoinBigIndexArrayWithLength convertColumnToRowU_
Converts columns to rows in U.