25#define LARGE_SET COIN_INT_MAX - 10
26#define LARGE_UNSET (LARGE_SET + 1)
135#define ABC_USE_FUNCTION_POINTERS 0
138#ifdef ABC_USE_FUNCTION_POINTERS
139 typedef void (*
scatterUpdate)(int, CoinFactorizationDouble,
const CoinFactorizationDouble *, CoinFactorizationDouble *);
140#if ABC_USE_FUNCTION_POINTERS
155 return scatterPointersUColumnAddress_;
238 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
338 void toLongArray(CoinIndexedVector *vector,
int which)
const;
340 void fromLongArray(CoinIndexedVector *vector)
const;
342 void fromLongArray(
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();
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
388 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
496 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);
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
623 virtual int factorize(
AbcSimplex *model, CoinIndexedVector &stuff);
700 firstCount[count] = index;
701 nextCount[index] = next;
704 lastCount[next] = index;
713 assert(next != index);
714 assert(last != index);
716 lastCount[next] = last;
718 nextCount[last] = next;
722 firstCount[count] = next;
734 firstCount[count] = index;
737 assert(next != index);
738 assert(last != index);
739 nextCount[index] = next2;
742 lastCount[next] = last;
744 lastCount[next2] = index;
746 nextCount[last] = next;
748 int count = last + numberRows_ + 2;
749 firstCount[count] = next;
799 CoinIndexedVector *regionFT);
914 CoinBigIndex pivotRowPosition,
915 CoinBigIndex pivotColumnPosition,
922 CoinBigIndex pivotRowPosition,
923 CoinBigIndex pivotColumnPosition,
930#define ABC_DENSE_CODE 0
945#ifdef ABC_USE_FUNCTION_POINTERS
948 CoinFactorizationDouble *elementUColumnPlusAddress_;
952 CoinBigIndex *convertRowToColumnUAddress_;
954 CoinBigIndex *convertColumnToRowUAddress_;
1045#ifdef ABC_USE_FUNCTION_POINTERS
1047 CoinBigIndex lastEntryByColumnUPlus_;
1049 CoinBigIndex lengthAreaUPlus_;
1059#if COIN_BIG_DOUBLE == 1
1061 mutable CoinFactorizationLongDoubleArrayWithLength longArray_[
FACTOR_CPU];
1063 mutable CoinIndexedVector *associatedVector_[
FACTOR_CPU];
1102#ifdef ABC_USE_FUNCTION_POINTERS
1104 CoinArbitraryArrayWithLength scatterUColumn_;
1108 CoinBigIndexArrayWithLength convertRowToColumnU_;
1111 CoinBigIndexArrayWithLength convertColumnToRowU_;
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; }
#define FACTOR_CPU
This deals with Factorization and Updates.
#define ABC_FAC_GOT_UCOPY
#define ABC_FAC_GOT_RCOPY
#define ABC_FAC_GOT_SPARSE
#define ABC_FAC_GOT_LCOPY
unsigned int CoinSimplexUnsignedInt
unsigned char CoinCheckZero
void(* scatterUpdate)(int, CoinFactorizationDouble, const CoinFactorizationDouble *, double *) SCATTER_ATTRIBUTE
Abstract base class which also has some scalars so can be used from Dense or Simp.
double zeroTolerance_
Zero tolerance.
virtual double checkReplacePart1b(CoinIndexedVector *, int)
virtual void checkReplacePart1a(CoinIndexedVector *, int)
int numberRows_
Number of Rows in factorization.
CoinBigIndex * startRowL() const
Start of each row in L.
CoinBigIndex lengthAreaU_
Length of area reserved for U.
CoinIntArrayWithLength indexColumnU_
Base address for U (may change)
CoinSimplexInt * nextColumnAddress_
void updateColumnTransposeU(CoinIndexedVector *region, CoinSimplexInt smallestIndex, CoinAbcStatistics &statistics) const
Updates part of column transpose (BTRANU), assumes index is sorted i.e.
void deleteLink(CoinSimplexInt index)
Deletes a link in chain of equal counts.
void gutsOfDestructor(CoinSimplexInt type=1)
The real work of constructors etc 0 just scalars, 1 bit normal.
void gutsOfInitialize(CoinSimplexInt type)
1 bit - tolerances etc, 2 more, 4 dummy arrays
CoinSimplexInt lastSlack_
CoinSimplexInt maximumRowsExtra() const
Maximum of Rows after iterating.
CoinBigIndex maximumU_
Maximum space used in U.
CoinIntArrayWithLength numberInColumn_
Number in each Column.
double btranFullAverageAfterL_
CoinFactorizationDoubleArrayWithLength elementU_
Elements of U.
CoinSimplexInt * firstCount() const
For equal counts in factorization.
bool getColumnSpace(CoinSimplexInt iColumn, CoinSimplexInt extraNeeded)
Gets space for one Column with given length, may have to do compression (returns True if successful),...
CoinSimplexInt * pivotLinkedForwards() const
void updateColumnTransposeRDensish(CoinIndexedVector *region) const
Updates part of column transpose (BTRANR) when dense.
CoinFactorizationDouble * elementUAddress_
CoinFactorizationDouble * denseAreaAddress_
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...
CoinIntArrayWithLength saveColumn_
Columns left to do in a single pivot.
double btranFullCountAfterR_
CoinSimplexInt * listAddress_
CoinSimplexInt numberFtranFTCounts_
double btranFullCountAfterL_
CoinSimplexInt * nextCount() const
Next Row/Column with count.
bool getRowSpace(CoinSimplexInt iRow, CoinSimplexInt extraNeeded)
Gets space for one Row with given length, may have to do compression (returns True if successful),...
double ftranFullCountAfterR_
double ftranFTCountAfterU_
CoinSimplexInt numberRowsSmall_
Size of small inverse.
double ftranFullAverageAfterL_
double btranFullAverageAfterR_
CoinBigIndex lengthAreaR_
length of area reserved for R
CoinFactorizationDoubleArrayWithLength pivotRegion_
Inverses of pivot values.
CoinBigIndex numberElementsL() const
Returns number in L area.
CoinSimplexInt numberForrestTomlin() const
Length of FT vector.
CoinSimplexInt factorSparse()
Does sparse phase of factorization return code is <0 error, 0= finished.
CoinBigIndex numberL() const
Number in L.
virtual CoinSimplexInt updateColumnFT(CoinIndexedVector ®ionSparse)
Later take out return codes (apart from +- 1 on FT)
CoinBigIndex * startColumnUAddress_
virtual void makeNonSingular(CoinSimplexInt *sequence)
Makes a non-singular basis by replacing variables.
double ftranAverageAfterR_
virtual CoinFactorizationDouble * pivotRegion() const
Returns address of pivot region.
CoinFactorizationDouble * elementU() const
Elements of U.
double ftranFullCountAfterL_
double btranFullAverageAfterU_
bool reorderU()
Reorders U so contiguous and in order (if there is space) Returns true if it could.
CoinSimplexInt * numberInColumnPlusAddress_
CoinSimplexInt * pivotLOrder() const
void updateColumnLDense(CoinIndexedVector *region) const
Updates part of column (FTRANL) when dense (i.e. do as inner products)
CoinSimplexDouble adjustedAreaFactor() const
Returns areaFactor but adjusted for dense.
CoinIntArrayWithLength nextRow_
Next Row in memory order.
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,...
CoinBigIndex baseL() const
Base of L.
virtual void checkMarkArrays() const
CoinSimplexInt numberFtranCounts_
CoinSimplexInt * numberInRowAddress_
void updatePartialUpdate(CoinIndexedVector &partialUpdate)
Update partial Ftran by R update.
virtual void replaceColumnPart3(const AbcSimplex *model, CoinIndexedVector *regionSparse, CoinIndexedVector *tableauColumn, CoinIndexedVector *partialUpdate, int pivotRow, double alpha)
Replaces one Column to basis, partial update in vector.
void updateColumnTransposeUDensish(CoinIndexedVector *region, CoinSimplexInt smallestIndex) const
Updates part of column transpose (BTRANU) when densish, assumes index is sorted i....
void updateColumnUSparse(CoinIndexedVector *regionSparse) const
Updates part of column (FTRANU) when sparse.
double ftranFTAverageAfterR_
virtual CoinBigIndex numberElements() const
Total number of elements in factorization.
CoinSimplexInt numberRowsExtra_
Number of Rows after iterating.
void checkSparse()
See if worth going sparse.
bool storeFT(const CoinIndexedVector *regionFT)
Store update after doing L and R - retuns false if no room.
CoinBigIndex numberElementsR() const
Returns number in R area.
virtual void updateFullColumn(CoinIndexedVector ®ionSparse) const
Updates one full column (FTRAN)
CoinSimplexInt numberR_
Number in R.
CoinBigIndex * startColumnL() const
Start of each column in L.
CoinAbcTypeFactorization & operator=(const CoinAbcTypeFactorization &other)
= copy
CoinFactorizationDoubleArrayWithLength elementByRowL_
Elements in L (row copy)
CoinBigIndex numberL_
Number in L.
CoinUnsignedIntArrayWithLength workArea2_
Second work area.
virtual CoinSimplexInt * pivotColumn() const
Returns address of pivotColumn region (also used for permuting)
CoinBigIndex * startColumnR() const
Start of columns for R.
double ftranFTCountInput_
void updateColumnPFI(CoinIndexedVector *regionSparse) const
Updates part of column PFI (FTRAN) (after rest)
void updateColumnL(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column (FTRANL)
CoinSimplexInt * lastCount() const
Previous Row/Column with count.
void doAddresses()
Set up addresses from arrays.
double ftranCountInput_
To decide how to solve.
void separateLinks(CoinSimplexInt, CoinSimplexInt)
CoinBigIndexArrayWithLength startRowL_
Start of each row in L.
friend void CoinAbcFactorizationUnitTest(const std::string &mpsDir)
CoinBigIndexArrayWithLength startColumnL_
Start of each column in L.
virtual CoinSimplexInt * numberInColumn() const
Number of entries in each column.
double ftranFullCountAfterU_
CoinBigIndex lastEntryByRowU_
Last entry by row for U.
const double * denseVector(const CoinIndexedVector &vector) const
void sort() const
Debug - sort so can compare.
CoinSimplexInt * numberInColumnAddress_
double ftranFTCountAfterL_
virtual bool wantsTableauColumn() const
Returns true if wants tableauColumn in replaceColumn.
CoinBigIndex lengthU_
Length of U.
CoinSimplexInt * pivotLinkedForwardsAddress_
CoinFactorizationDouble * workAreaAddress_
CoinBigIndex * startRowLAddress_
CoinBigIndex lastEntryByColumnU_
Last entry by column for U.
CoinAbcTypeFactorization()
Default constructor.
CoinBigIndex * startColumnLAddress_
CoinSimplexInt * pivotLinkedBackwards() const
Forward and backward linked lists (numberRows_+2)
CoinSimplexInt sparseThreshold() const
get sparse threshold
void scan(CoinIndexedVector *vector) const
Scans region to find nonzeros.
CoinBigIndex * startRowUAddress_
void updateColumnLDensish(CoinIndexedVector *region) const
Updates part of column (FTRANL) when densish.
CoinFactorizationDoubleArrayWithLength elementRowU_
Elements of U by row.
CoinSimplexInt state_
State of saved version and what can be done 0 - nothing saved 1 - saved and can go back to previous s...
CoinSimplexInt * sparseAddress_
CoinSimplexDouble maximumCoefficient() const
Returns maximum absolute value in factorization.
virtual void preProcess()
PreProcesses column ordered copy of basis.
CoinBigIndex sizeSparseArray_
Size in bytes of a sparseArray.
void pack(CoinIndexedVector *regionFrom, CoinIndexedVector *regionTo) const
CoinIntArrayWithLength numberInRow_
Number in each Row.
double * denseVector(CoinIndexedVector *vector) const
Returns double * associated with vector.
CoinIntArrayWithLength pivotColumn_
Pivot order for each Column.
CoinSimplexInt maximumRowsExtra_
Maximum number of Rows after iterating.
CoinBigIndex lengthAreaU() const
Returns length of U area.
CoinSimplexInt messageLevel_
Detail in messages.
CoinBigIndex getColumnSpaceIterate(CoinSimplexInt iColumn, CoinFactorizationDouble value, CoinSimplexInt iRow)
getColumnSpaceIterate.
bool pivotRowSingleton(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
Does one pivot on Row Singleton in factorization.
CoinBigIndex lengthAreaL_
Length of area reserved for L.
virtual CoinSimplexInt * indices() const
Returns array to put basis indices in.
void cleanup()
Cleans up at end of factorization.
CoinSimplexInt numberU_
Number in U.
virtual int updateColumnFTPart1(CoinIndexedVector ®ionSparse)
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.
CoinSimplexInt sparseThreshold_
Below this use sparse technology - if 0 then no L row copy.
CoinBigIndex * startColumnU() const
Start of each column in U.
CoinSimplexInt * indexRowU() const
Row indices of U.
CoinBigIndex lengthAreaL() const
Returns length of L area.
void separateLinks()
Separate out links with same row/column count.
double btranFullCountAfterU_
double ftranFTCountAfterR_
CoinBigIndex firstZeroed_
First place in funny copy zeroed out.
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.
CoinSimplexInt * lastCountAddress_
Previous Row/Column with count.
CoinIntArrayWithLength lastRow_
Previous Row in memory order.
CoinSimplexInt numberRowsExtra() const
Number of Rows after iterating.
CoinSimplexInt numberFtranFullCounts_
double btranAverageAfterU_
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.
void updateColumnR(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column (FTRANR) without FT update.
CoinSimplexInt factorDense()
Does dense phase of factorization return code is <0 error, 0= finished.
double btranAverageAfterL_
CoinSimplexInt * indexRowL() const
Row indices of L.
double ftranFTAverageAfterL_
virtual void updateColumnFT(CoinIndexedVector ®ionSparseFT, CoinIndexedVector &partialUpdate, int which)
Updates one column (FTRAN) Tries to do FT update puts partial update in vector.
virtual void maximumPivots(CoinSimplexInt value)
Set maximum pivots.
CoinSimplexInt * nextCountAddress_
Next Row/Column with count.
CoinBigIndex lengthL_
Length of L.
CoinSimplexInt numberTrials_
Number of trials before rejection.
CoinSimplexInt numberRowsLeft_
Number Rows left (numberRows-numberGood)
const double * denseVector(const CoinIndexedVector *vector) const
Returns double * associated with vector.
void updateColumnLSparse(CoinIndexedVector *region) const
Updates part of column (FTRANL) when sparse.
virtual void getAreas(CoinSimplexInt numberRows, CoinSimplexInt numberColumns, CoinBigIndex maximumL, CoinBigIndex maximumU)
Gets space for a factorization, called by constructors.
double ftranAverageAfterL_
virtual void updateColumnFTPart2(CoinIndexedVector ®ionSparse)
int wantToGoDense()
After pivoting - returns true if need to go dense.
CoinSimplexInt checkPivot(CoinSimplexDouble saveFromU, CoinSimplexDouble oldPivot) const
Returns accuracy status of replaceColumn returns 0=OK, 1=Probably OK, 2=singular.
double ftranFullAverageAfterU_
CoinBigIndex totalElements_
Number of elements in U (to go) or while iterating total overall.
CoinFactorizationDouble * elementByRowLAddress_
CoinFactorizationDouble * elementByRowL() const
Elements in L (row copy)
virtual void updateWeights(CoinIndexedVector ®ionSparse) const
Updates one column for dual steepest edge weights (FTRAN)
CoinBigIndexArrayWithLength startColumnU_
Start of each column in U.
void almostDestructor()
Delete all stuff (leaves as after CoinAbcFactorization())
CoinIntArrayWithLength lastColumn_
Previous Column in memory order.
void updateColumnTransposeRSparse(CoinIndexedVector *region) const
Updates part of column transpose (BTRANR) when sparse.
void modifyLink(CoinSimplexInt index, CoinSimplexInt count)
Modifies links in chain of equal counts.
virtual void updateColumnCpu(CoinIndexedVector ®ionSparse, int whichCpu) const
Updates one column (FTRAN)
virtual ~CoinAbcTypeFactorization()
Destructor.
void updateColumnTransposeLByRow(CoinIndexedVector *region) const
Updates part of column transpose (BTRANL) when densish by row.
void afterPivot(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
After pivoting.
CoinSimplexInt leadingDimension_
Leading dimension for dense.
CoinSimplexInt * pivotLOrderAddress_
CoinIntArrayWithLength indexRowL_
Row indices of L.
CoinBigIndexArrayWithLength startRowU_
Start of each Row as pointer.
CoinIntArrayWithLength numberInColumnPlus_
Number in each Column including pivoted.
CoinSimplexInt * nextRowAddress_
virtual CoinSimplexInt updateColumnTranspose(CoinIndexedVector ®ionSparse) const
Updates one column (BTRAN) from regionSparse2 regionSparse starts as zero and is zero at end Note - i...
void setNumberElementsU(CoinBigIndex value)
Setss number in U area.
void messageLevel(CoinSimplexInt value)
void preProcess(CoinSimplexInt)
bool spaceForForrestTomlin() const
True if FT update and space.
CoinSimplexInt * indexRowUAddress_
void sparseThreshold(CoinSimplexInt value)
set sparse threshold
void fromLongArray(int which) const
From a work array and dis-associate vector.
void updateColumnTransposeUSparse(CoinIndexedVector *region) const
Updates part of column transpose (BTRANU) when sparse, assumes index is sorted i.e.
double btranAverageAfterR_
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
void updateColumnTransposeL(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column transpose (BTRANL)
CoinSimplexInt numberBtranCounts_
bool pivotOneOtherRow(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
Pivots when just one other row so faster?
void updateColumnTransposeLSparse(CoinIndexedVector *region) const
Updates part of column transpose (BTRANL) when sparse (by Row)
CoinSimplexInt maximumRows_
Maximum rows (ever) (here to use double alignment)
virtual void postProcess(const CoinSimplexInt *sequence, CoinSimplexInt *pivotVariable)
Does post processing on valid factorization - putting variables on correct rows.
void updateColumnU(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column (FTRANU)
CoinSimplexInt * indexColumnL() const
Index of column in row for L.
int pivot(CoinSimplexInt &pivotRow, CoinSimplexInt &pivotColumn, CoinBigIndex pivotRowPosition, CoinBigIndex pivotColumnPosition, int *COIN_RESTRICT markRow)
CoinFactorizationDoubleArrayWithLength denseArea_
Dense area.
CoinSimplexInt * permute() const
Returns address of permute region.
CoinBigIndex lengthR_
Length of R stuff.
CoinAbcTypeFactorization(const CoinAbcTypeFactorization &other)
Copy constructor.
CoinSimplexInt * indexRowLAddress_
CoinBigIndex baseL_
Base of L.
CoinBigIndex numberCompressions_
Number of compressions done.
void unpack(CoinIndexedVector *regionFrom, CoinIndexedVector *regionTo) const
CoinSimplexInt * indexColumnUAddress_
CoinIntArrayWithLength permute_
Permutation vector for pivot row order.
double * denseVector(CoinIndexedVector &vector) const
CoinSimplexInt initialNumberRows_
Rows first time nonzero.
CoinSimplexDouble conditionNumber() const
Condition number - product of pivots after factorization.
void updateColumnUDensish(CoinIndexedVector *regionSparse) const
Updates part of column (FTRANU)
void fromLongArray(CoinIndexedVector *vector) const
From a work array and dis-associate vector.
CoinSimplexInt * indexColumnLAddress_
CoinFactorizationDouble * elementRowUAddress_
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.
CoinIntArrayWithLength indexColumnL_
Index of column in row for L.
bool getRowSpaceIterate(CoinSimplexInt iRow, CoinSimplexInt extraNeeded)
Gets space for one Row with given length while iterating, may have to do compression (returns True if...
void resetStatistics()
Reset all sparsity etc statistics.
CoinSimplexInt * permuteAddress_
virtual double checkReplacePart1(CoinIndexedVector *regionSparse, CoinIndexedVector *partialUpdate, int pivotRow)
Checks if can replace one Column to basis, returns update alpha Fills in region for use later partial...
double preProcess3()
Return largest element.
void updateColumnTransposePFI(CoinIndexedVector *region) const
Updates part of column transpose PFI (BTRAN) (before rest)
void updateColumnTransposeR(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column transpose (BTRANR)
CoinSimplexInt * pivotLinkedBackwardsAddress_
CoinCheckZero * markRowAddress_
void goSparse()
makes a row copy of L for speed and to allow very sparse problems
CoinSimplexInt * pivotColumnAddress_
CoinIntArrayWithLength nextColumn_
Next Column in memory order.
virtual CoinSimplexInt factor(AbcSimplex *model)
Does most of factorization.
CoinIntArrayWithLength firstCount_
First Row/Column with count of k, can tell which by offset - Rows then Columns.
virtual CoinFactorizationDouble * elements() const
Returns array to put basis elements in.
CoinSimplexUnsignedInt * workArea2Address_
CoinFactorizationDoubleArrayWithLength workArea_
First work area.
CoinSimplexInt * lastColumnAddress_
CoinSimplexInt maximumMaximumPivots_
Maximum maximum pivots.
virtual void updateFullColumnTranspose(CoinIndexedVector ®ionSparse) const
Updates one full column (BTRAN)
double ftranFTAverageAfterU_
double ftranFullAverageAfterR_
CoinBigIndex numberCompressions() const
Number of compressions done.
void printRegion(const CoinIndexedVector &vector, const char *where) const
void toLongArray(CoinIndexedVector *vector, int which) const
To a work array and associate vector.
CoinSimplexInt * saveColumnAddress_
CoinIntArrayWithLength markRow_
Marks rows to be updated.
virtual CoinAbcAnyFactorization * clone() const
Clone.
void clearArrays()
Get rid of all memory.
CoinSimplexInt * indexRowRAddress_
Row indices for R.
void updateColumnUDense(CoinIndexedVector *regionSparse) const
Updates part of column (FTRANU) when dense (i.e. do as inner products)
double btranFullCountInput_
To decide how to solve.
double ftranFullCountInput_
To decide how to solve.
void addLink(CoinSimplexInt index, CoinSimplexInt count)
Adds a link in chain of equal counts.
CoinSimplexInt messageLevel() const
Level of detail of messages.
void updateColumnTransposeLDensish(CoinIndexedVector *region) const
Updates part of column transpose (BTRANL) when densish by column.
void setDenseThreshold(CoinSimplexInt value)
Sets dense threshold.
CoinSimplexInt numberGoodL_
Number factorized in L.
CoinSimplexInt denseThreshold() const
Gets dense threshold.
CoinSimplexInt denseThreshold_
Dense threshold (here to use double alignment)
void checkConsistency()
Checks that row and column copies look OK.
CoinFactorizationDouble * pivotRegionAddress_
CoinIntArrayWithLength sparse_
Sparse regions.
CoinIntArrayWithLength indexRowU_
Row indices of U.
CoinSimplexInt numberBtranFullCounts_
virtual void updateColumnTransposeCpu(CoinIndexedVector ®ionSparse, int whichCpu) const
Updates one column (BTRAN)
virtual CoinSimplexInt * numberInRow() const
Number of entries in each row.
CoinSimplexInt * firstCountAddress_
CoinFactorizationDouble * elementRAddress_
Elements of R.
double ftranAverageAfterU_
CoinBigIndex * startColumnRAddress_
virtual void replaceColumnPart3(const AbcSimplex *model, CoinIndexedVector *regionSparse, CoinIndexedVector *tableauColumn, int pivotRow, double alpha)
Replaces one Column to basis, partial update already in U.
CoinBigIndex numberElementsU() const
Returns number in U area.
void updateColumnTransposeUByColumn(CoinIndexedVector *region, CoinSimplexInt smallestIndex) const
Updates part of column transpose (BTRANU) by column assumes index is sorted i.e.
bool getColumnSpaceIterateR(CoinSimplexInt iColumn, CoinFactorizationDouble value, CoinSimplexInt iRow)
getColumnSpaceIterateR.
CoinAbcTypeFactorization(const CoinFactorization &other)
Copy constructor.
CoinSimplexInt * lastRowAddress_
CoinFactorizationDoubleArrayWithLength elementL_
Elements of L.
CoinFactorizationDouble * elementLAddress_
virtual CoinSimplexInt updateColumn(CoinIndexedVector ®ionSparse) const
This version has same effect as above with FTUpdate==false so number returned is always >=0.
void gutsOfCopy(const CoinAbcTypeFactorization &other)
void show_self() const
Debug show object (shows one representation)
void pivotColumnSingleton(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
Does one pivot on Column Singleton in factorization (can't return false)
virtual CoinBigIndex * starts() const
Returns pivot row.