coin-Bcp
CoinAbcBaseFactorization.hpp
Go to the documentation of this file.
1 /* $Id: CoinAbcBaseFactorization.hpp 2385 2019-01-06 19:43:06Z unxusr $ */
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others, Copyright (C) 2012, FasterCoin. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5 
6 /*
7  Authors
8 
9  John Forrest
10 
11  */
18 #include "AbcCommon.hpp"
20 #if ABC_PARALLEL
21 #define FACTOR_CPU 4
22 #else
23 #define FACTOR_CPU 1
24 #endif
25 #define LARGE_SET COIN_INT_MAX - 10
26 #define LARGE_UNSET (LARGE_SET + 1)
27 
29  friend void CoinAbcFactorizationUnitTest(const std::string &mpsDir);
30 
31 public:
40 
42  virtual ~CoinAbcTypeFactorization();
44  virtual CoinAbcAnyFactorization *clone() const;
46  void almostDestructor();
48  void show_self() const;
50  void sort() const;
54 
59 
61 
64  inline CoinSimplexInt *permute() const
66  {
67  return NULL; //permute_.array();
68  }
70  virtual inline CoinSimplexInt *indices() const
71  {
72  return indexRowU_.array();
73  }
75  virtual inline CoinSimplexInt *pivotColumn() const
76  {
77  return pivotColumn_.array();
78  }
80  virtual inline CoinFactorizationDouble *pivotRegion() const
81  {
82  return pivotRegionAddress_;
83  }
84 #if ABC_SMALL < 2
85  inline CoinBigIndex *startRowL() const
87  {
88  return startRowL_.array();
89  }
90 #endif
91 
93  inline CoinBigIndex *startColumnL() const
94  {
95  return startColumnL_.array();
96  }
97 
98 #if ABC_SMALL < 2
99  inline CoinSimplexInt *indexColumnL() const
101  {
102  return indexColumnL_.array();
103  }
104 #endif
105 
107  inline CoinSimplexInt *indexRowL() const
108  {
109  return indexRowL_.array();
110  }
111 
112 #if ABC_SMALL < 2
113  inline CoinFactorizationDouble *elementByRowL() const
115  {
116  return elementByRowL_.array();
117  }
118 #endif
119 
123  {
124  return firstCount_.array() + numberRows_ + 1;
125  }
127  {
128  return firstCount_.array() + 2 * numberRows_ + 3;
129  }
130  inline CoinSimplexInt *pivotLOrder() const
131  {
132  return firstCount_.array();
133  }
134 #if ABC_SMALL < 0
135 #define ABC_USE_FUNCTION_POINTERS 0
136 #define SMALL_PERMUTE
137 #endif
138 #ifdef ABC_USE_FUNCTION_POINTERS
140 #if ABC_USE_FUNCTION_POINTERS
141  typedef struct {
142  scatterUpdate functionPointer;
143  CoinBigIndex offset;
144  int number;
145  } scatterStruct;
146 #else
147  typedef struct {
148  CoinBigIndex offset;
149  int number;
150  } scatterStruct;
151 #endif
152  inline scatterStruct *scatterUColumn() const
154  {
155  return scatterPointersUColumnAddress_;
156  }
157 #endif
158 
160 
163  inline CoinSimplexInt *firstCount() const
164  {
165  return firstCount_.array();
166  }
167 
169  inline CoinSimplexInt *nextCount() const
170  {
171  return firstCount_.array() + numberRows_ + 2;
172  }
173 
175  inline CoinSimplexInt *lastCount() const
176  {
177  return firstCount_.array() + 3 * numberRows_ + 2;
178  }
179 
182  {
183  return numberRowsExtra_;
184  }
186  inline CoinBigIndex numberL() const
187  {
188  return numberL_;
189  }
190 
192  inline CoinBigIndex baseL() const
193  {
194  return baseL_;
195  }
198  {
199  return maximumRowsExtra_;
200  }
202  virtual inline CoinBigIndex numberElements() const
203  {
204  return totalElements_;
205  }
208  {
210  }
215  {
216  return messageLevel_;
217  }
218  void messageLevel(CoinSimplexInt value);
220  virtual void maximumPivots(CoinSimplexInt value);
221 
222 #if ABC_SMALL < 4
223  inline CoinSimplexInt denseThreshold() const
225  {
226  return denseThreshold_;
227  }
230  {
231  denseThreshold_ = value;
232  }
233 #endif
236 #if 0
237  inline bool forrestTomlin() const
239  { return doForrestTomlin_;}
240  inline void setForrestTomlin(bool value)
241  { doForrestTomlin_=value;}
242 #endif
243  inline bool spaceForForrestTomlin() const
245  {
247  CoinBigIndex space = lengthAreaU_ - (start + numberRowsExtra_);
248  return (space >= 0); //&&doForrestTomlin_;
249  }
251 
254 
257  {
258  return lengthU_;
259  }
261  inline void setNumberElementsU(CoinBigIndex value)
262  {
263  lengthU_ = value;
264  }
266  inline CoinBigIndex lengthAreaU() const
267  {
268  return lengthAreaU_;
269  }
272  {
273  return lengthL_;
274  }
276  inline CoinBigIndex lengthAreaL() const
277  {
278  return lengthAreaL_;
279  }
282  {
283  return lengthR_;
284  }
287  {
288  return numberCompressions_;
289  }
291  //virtual CoinSimplexInt * pivotRow() const;
293  //virtual CoinFactorizationDouble * workArea() const;
295  //virtual CoinSimplexInt * intWorkArea() const;
297  virtual inline CoinBigIndex *starts() const
298  {
299  return startColumnU_.array();
300  }
302  virtual inline CoinSimplexInt *numberInRow() const
303  {
304  return numberInRow_.array();
305  }
307  virtual inline CoinSimplexInt *numberInColumn() const
308  {
309  return numberInColumn_.array();
310  }
312  virtual inline CoinFactorizationDouble *elements() const
313  {
314  return elementU_.array();
315  }
317  inline CoinBigIndex *startColumnR() const
318  {
319  return reinterpret_cast< CoinBigIndex * >(firstCount_.array() + 3 * numberRows_ + 4);
320  }
323  {
324  return elementU_.array();
325  }
327  inline CoinSimplexInt *indexRowU() const
328  {
329  return indexRowU_.array();
330  }
332  inline CoinBigIndex *startColumnU() const
333  {
334  return startColumnU_.array();
335  }
336 #if COIN_BIG_DOUBLE == 1
337  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();
355 #else
356  inline double *denseVector(CoinIndexedVector *vector) const
358  {
359  return vector->denseVector();
360  }
361  inline double *denseVector(CoinIndexedVector &vector) const
362  {
363  return vector.denseVector();
364  }
366  inline const double *denseVector(const CoinIndexedVector *vector) const
367  {
368  return vector->denseVector();
369  }
370  inline const double *denseVector(const CoinIndexedVector &vector) const
371  {
372  return vector.denseVector();
373  }
375  inline void toLongArray(CoinIndexedVector *vector, int which) const {}
377  inline void fromLongArray(CoinIndexedVector *vector) const {}
379  inline void fromLongArray(int which) const {}
381  inline void scan(CoinIndexedVector *vector) const
382  {
383  vector->scan(0, numberRows_, zeroTolerance_);
384  }
385 #endif
386 #ifdef ABC_ORDERED_FACTORIZATION
387  void permuteInForFtran(CoinIndexedVector &regionSparse, bool full = false) const;
390  void permuteInForBtranAndMultiply(CoinIndexedVector &regionSparse, bool full = false) const;
392  void permuteOutForBtran(CoinIndexedVector &regionSparse) const;
393 #endif
394 
399  //inline CoinSimplexInt persistenceFlag() const
400  //{ return persistenceFlag_;}
402 
405 #if 0
406 
410  virtual int checkReplace ( const AbcSimplex * model,
411  CoinIndexedVector * regionSparse,
412  int pivotRow,
413  CoinSimplexDouble & pivotCheck,
414  double acceptablePivot = 1.0e-8);
419  virtual CoinSimplexInt replaceColumn ( CoinIndexedVector * regionSparse,
421  CoinSimplexDouble pivotCheck ,
422  bool skipBtranU=false,
423  CoinSimplexDouble acceptablePivot=1.0e-8);
424 #endif
425 
429  virtual
430 #ifdef ABC_LONG_FACTORIZATION
431  long
432 #endif
433  double
434  checkReplacePart1(CoinIndexedVector *regionSparse,
435  int pivotRow);
440  virtual
441 #ifdef ABC_LONG_FACTORIZATION
442  long
443 #endif
444  double
445  checkReplacePart1(CoinIndexedVector *regionSparse,
446  CoinIndexedVector *partialUpdate,
447  int pivotRow);
448 #ifdef MOVE_REPLACE_PART1A
449 
453  virtual void checkReplacePart1a(CoinIndexedVector *regionSparse,
454  int pivotRow);
455  virtual
456 #ifdef ABC_LONG_FACTORIZATION
457  long
458 #endif
459  double
461  int pivotRow);
462 #endif
463 
465  virtual int checkReplacePart2(int pivotRow,
466  CoinSimplexDouble btranAlpha,
467  double ftranAlpha,
468 #ifdef ABC_LONG_FACTORIZATION
469  long
470 #endif
471  double ftAlpha,
472  double acceptablePivot = 1.0e-8);
475  virtual void replaceColumnPart3(const AbcSimplex *model,
476  CoinIndexedVector *regionSparse,
477  CoinIndexedVector *tableauColumn,
478  int pivotRow,
479 #ifdef ABC_LONG_FACTORIZATION
480  long
481 #endif
482  double alpha);
485  virtual void replaceColumnPart3(const AbcSimplex *model,
486  CoinIndexedVector *regionSparse,
487  CoinIndexedVector *tableauColumn,
488  CoinIndexedVector *partialUpdate,
489  int pivotRow,
490 #ifdef ABC_LONG_FACTORIZATION
491  long
492 #endif
493  double alpha);
494 #ifdef EARLY_FACTORIZE
495  virtual int replaceColumns(const AbcSimplex *model,
497  CoinIndexedVector &stuff,
498  int firstPivot, int lastPivot, bool cleanUp);
499 #endif
500  void updatePartialUpdate(CoinIndexedVector &partialUpdate);
503  inline virtual bool wantsTableauColumn() const
504  {
505  return false;
506  }
510  int replaceColumnU(CoinIndexedVector *regionSparse,
511  CoinBigIndex *deletedPosition,
512  CoinSimplexInt *deletedColumns,
515 
518 
520 
526  virtual CoinSimplexInt updateColumnFT(CoinIndexedVector &regionSparse);
527  virtual int updateColumnFTPart1(CoinIndexedVector &regionSparse);
528  virtual void updateColumnFTPart2(CoinIndexedVector &regionSparse);
532  virtual void updateColumnFT(CoinIndexedVector &regionSparseFT,
533  CoinIndexedVector &partialUpdate,
534  int which);
537  virtual CoinSimplexInt updateColumn(CoinIndexedVector &regionSparse) const;
544  CoinIndexedVector &regionOther);
549  virtual CoinSimplexInt updateColumnTranspose(CoinIndexedVector &regionSparse) const;
551  virtual void updateFullColumn(CoinIndexedVector &regionSparse) const;
553  virtual void updateFullColumnTranspose(CoinIndexedVector &regionSparse) const;
555  virtual void updateWeights(CoinIndexedVector &regionSparse) const;
557  virtual void updateColumnCpu(CoinIndexedVector &regionSparse, int whichCpu) const;
559  virtual void updateColumnTransposeCpu(CoinIndexedVector &regionSparse, int whichCpu) const;
560  void unpack(CoinIndexedVector *regionFrom,
561  CoinIndexedVector *regionTo) const;
562  void pack(CoinIndexedVector *regionFrom,
563  CoinIndexedVector *regionTo) const;
565  inline void goSparse() {}
566  void goSparse2();
567 #ifndef NDEBUG
568  virtual void checkMarkArrays() const;
569 #endif
570 #if ABC_SMALL < 2
571 
573  {
574  return sparseThreshold_;
575  }
576 #endif
577 
578  void sparseThreshold(CoinSimplexInt value);
580 
585  inline void clearArrays()
587  {
589  }
591 
592  void checkSparse();
595  void gutsOfDestructor(CoinSimplexInt type = 1);
597  void gutsOfInitialize(CoinSimplexInt type);
598  void gutsOfCopy(const CoinAbcTypeFactorization &other);
599 
601  void resetStatistics();
602  void printRegion(const CoinIndexedVector &vector, const char *where) const;
603 
605 
607  virtual void getAreas(CoinSimplexInt numberRows,
609  CoinSimplexInt numberColumns,
610  CoinBigIndex maximumL,
611  CoinBigIndex maximumU);
612 
614  virtual void preProcess();
617  double preProcess3();
618  void preProcess4();
620  virtual CoinSimplexInt factor(AbcSimplex *model);
621 #ifdef EARLY_FACTORIZE
622  virtual int factorize(AbcSimplex *model, CoinIndexedVector &stuff);
624 #endif
625  virtual void postProcess(const CoinSimplexInt *sequence, CoinSimplexInt *pivotVariable);
628  virtual void makeNonSingular(CoinSimplexInt *sequence);
629 
630 protected:
637 
651  int wantToGoDense();
652 
657  bool getColumnSpace(CoinSimplexInt iColumn,
658  CoinSimplexInt extraNeeded);
659 
662  bool reorderU();
667  CoinSimplexInt iRow);
674  CoinSimplexInt iRow);
678  bool getRowSpace(CoinSimplexInt iRow, CoinSimplexInt extraNeeded);
679 
684  CoinSimplexInt extraNeeded);
686  void checkConsistency();
687 //#define CHECK_LINKS
688 #ifdef CHECK_LINKS
689  void checkLinks(int x = 0);
690 #else
691 #define checkLinks(x)
692 #endif
693  inline void addLink(CoinSimplexInt index, CoinSimplexInt count)
695  {
699  CoinSimplexInt next = firstCount[count];
700  firstCount[count] = index;
701  nextCount[index] = next;
702  lastCount[index] = count - numberRows_ - 2; // points to firstCount[count]
703  if (next >= 0)
704  lastCount[next] = index;
705  }
707  inline void deleteLink(CoinSimplexInt index)
708  {
711  CoinSimplexInt next = nextCount[index];
712  CoinSimplexInt last = lastCount[index];
713  assert(next != index);
714  assert(last != index);
715  if (next >= 0)
716  lastCount[next] = last;
717  if (last >= 0) {
718  nextCount[last] = next;
719  } else {
720  int count = last + numberRows_ + 2;
722  firstCount[count] = next;
723  }
724  }
726  inline void modifyLink(CoinSimplexInt index, CoinSimplexInt count)
727  {
731  CoinSimplexInt next2 = firstCount[count];
732  if (next2 == index)
733  return;
734  firstCount[count] = index;
735  CoinSimplexInt next = nextCount[index];
736  CoinSimplexInt last = lastCount[index];
737  assert(next != index);
738  assert(last != index);
739  nextCount[index] = next2;
740  lastCount[index] = count - numberRows_ - 2; // points to firstCount[count]
741  if (next >= 0)
742  lastCount[next] = last;
743  if (next2 >= 0)
744  lastCount[next2] = index;
745  if (last >= 0) {
746  nextCount[last] = next;
747  } else {
748  int count = last + numberRows_ + 2;
749  firstCount[count] = next;
750  }
751  }
753  void separateLinks();
756  void cleanup();
758  void doAddresses();
759 
761  void updateColumnL(CoinIndexedVector *region
762 #if ABC_SMALL < 2
763  ,
764  CoinAbcStatistics &statistics
765 #endif
766 #if ABC_PARALLEL
767  ,
768  int whichSparse = 0
769 #endif
770  ) const;
772  void updateColumnLDensish(CoinIndexedVector *region) const;
774  void updateColumnLDense(CoinIndexedVector *region) const;
777 #if ABC_PARALLEL
778  ,
779  int whichSparse
780 #endif
781  ) const;
782 
784  void updateColumnR(CoinIndexedVector *region
785 #if ABC_SMALL < 2
786  ,
787  CoinAbcStatistics &statistics
788 #endif
789 #if ABC_PARALLEL
790  ,
791  int whichSparse = 0
792 #endif
793  ) const;
795  bool storeFT(
796 #if ABC_SMALL < 3
797  const
798 #endif
799  CoinIndexedVector *regionFT);
801  void updateColumnU(CoinIndexedVector *region
802 #if ABC_SMALL < 2
803  ,
804  CoinAbcStatistics &statistics
805 #endif
806 #if ABC_PARALLEL
807  ,
808  int whichSparse = 0
809 #endif
810  ) const;
811 
813  void updateColumnUSparse(CoinIndexedVector *regionSparse
814 #if ABC_PARALLEL
815  ,
816  int whichSparse
817 #endif
818  ) const;
820  void updateColumnUDensish(CoinIndexedVector *regionSparse) const;
822  void updateColumnUDense(CoinIndexedVector *regionSparse) const;
825  CoinSimplexInt &numberNonZero1,
828  CoinSimplexInt &numberNonZero2,
830  CoinSimplexInt *COIN_RESTRICT index2) const;
832  void updateColumnPFI(CoinIndexedVector *regionSparse) const;
834  void updateColumnTransposePFI(CoinIndexedVector *region) const;
838  CoinSimplexInt smallestIndex
839 #if ABC_SMALL < 2
840  ,
841  CoinAbcStatistics &statistics
842 #endif
843 #if ABC_PARALLEL
844  ,
845  int whichCpu
846 #endif
847  ) const;
851  CoinSimplexInt smallestIndex) const;
855 #if ABC_PARALLEL
856  ,
857  int whichSparse
858 #endif
859  ) const;
863  CoinSimplexInt smallestIndex) const;
864 
867 #if ABC_SMALL < 2
868  ,
869  CoinAbcStatistics &statistics
870 #endif
871  ) const;
876 
879 #if ABC_SMALL < 2
880  ,
881  CoinAbcStatistics &statistics
882 #endif
883 #if ABC_PARALLEL
884  ,
885  int whichSparse
886 #endif
887  ) const;
894 #if ABC_PARALLEL
895  ,
896  int whichSparse
897 #endif
898  ) const;
899 public:
906 
907 protected:
914  CoinBigIndex pivotRowPosition,
915  CoinBigIndex pivotColumnPosition,
918  CoinSimplexInt increment2,
919  int *COIN_RESTRICT markRow);
922  CoinBigIndex pivotRowPosition,
923  CoinBigIndex pivotColumnPosition,
924  int *COIN_RESTRICT markRow);
925 #if ABC_SMALL < 2
926 #define CONVERTROW 2
927 #elif ABC_SMALL < 4
928 #else
929 #undef ABC_DENSE_CODE
930 #define ABC_DENSE_CODE 0
931 #endif
932 
934 protected:
945 #ifdef ABC_USE_FUNCTION_POINTERS
946  scatterStruct *scatterPointersUColumnAddress_;
948  CoinFactorizationDouble *elementUColumnPlusAddress_;
949 #endif
951 #if CONVERTROW
953 #if CONVERTROW > 1
955 #endif
956 #endif
957 #if ABC_SMALL < 2
959 #endif
973  //CoinSimplexInt * saveColumnAddress2_;
979 #if ABC_SMALL < 2
981 #endif
992 #if ABC_SMALL < 4
994 #endif
998 #ifdef SMALL_PERMUTE
999  CoinSimplexInt *fromSmallToBigRow_;
1000  CoinSimplexInt *fromSmallToBigColumn_;
1001 #endif
1017 #if ABC_SMALL < 2
1020 #endif
1045 #ifdef ABC_USE_FUNCTION_POINTERS
1046  CoinBigIndex lastEntryByColumnUPlus_;
1049  CoinBigIndex lengthAreaUPlus_;
1050 #endif
1055 #if ABC_SMALL < 4
1058 #endif
1059 #if COIN_BIG_DOUBLE == 1
1063  mutable CoinIndexedVector *associatedVector_[FACTOR_CPU];
1064 #endif
1102 #ifdef ABC_USE_FUNCTION_POINTERS
1103  CoinArbitraryArrayWithLength scatterUColumn_;
1105 #endif
1106 #if CONVERTROW
1109 #if CONVERTROW > 1
1112 #endif
1113 #endif
1114 #if ABC_SMALL < 2
1117 #endif
1124 #if ABC_SMALL < 4
1127 #endif
1132 #if ABC_SMALL < 2
1141 #endif
1146  // last slack pivot row
1148 #if ABC_SMALL < 2
1149  mutable double ftranCountInput_;
1151  mutable double ftranCountAfterL_;
1152  mutable double ftranCountAfterR_;
1153  mutable double ftranCountAfterU_;
1157 #if FACTORIZATION_STATISTICS
1158  double ftranTwiddleFactor1_;
1159  double ftranTwiddleFactor2_;
1160 #endif
1162 #endif
1165 #if ABC_SMALL < 2
1166  mutable double ftranFTCountInput_;
1167  mutable double ftranFTCountAfterL_;
1168  mutable double ftranFTCountAfterR_;
1169  mutable double ftranFTCountAfterU_;
1173 #if FACTORIZATION_STATISTICS
1174  double ftranFTTwiddleFactor1_;
1175  double ftranFTTwiddleFactor2_;
1176 #endif
1178 #endif
1179 #if ABC_SMALL < 4
1182 #endif
1183 #if ABC_SMALL < 2
1184  mutable double btranCountInput_;
1185  mutable double btranCountAfterU_;
1186  mutable double btranCountAfterR_;
1187  mutable double btranCountAfterL_;
1191 #if FACTORIZATION_STATISTICS
1192  double btranTwiddleFactor1_;
1193  double btranTwiddleFactor2_;
1194 #endif
1196 #endif
1199 #if ABC_SMALL < 2
1200  mutable double ftranFullCountInput_;
1202  mutable double ftranFullCountAfterL_;
1203  mutable double ftranFullCountAfterR_;
1204  mutable double ftranFullCountAfterU_;
1208 #if FACTORIZATION_STATISTICS
1209  double ftranFullTwiddleFactor1_;
1210  double ftranFullTwiddleFactor2_;
1211 #endif
1213 #endif
1216 #if ABC_SMALL < 2
1217  mutable double btranFullCountInput_;
1219  mutable double btranFullCountAfterL_;
1220  mutable double btranFullCountAfterR_;
1221  mutable double btranFullCountAfterU_;
1225 #if FACTORIZATION_STATISTICS
1226  double btranFullTwiddleFactor1_;
1227  double btranFullTwiddleFactor2_;
1228 #endif
1230 #endif
1231 
1240 
1241 public:
1242 #if ABC_SMALL < 2
1243 #if ABC_SMALL >= 0
1244  inline bool gotLCopy() const
1245  {
1246  return ((state_ & ABC_FAC_GOT_LCOPY) != 0);
1247  }
1248  inline void setNoGotLCopy() { state_ &= ~ABC_FAC_GOT_LCOPY; }
1250  inline bool gotRCopy() const { return ((state_ & ABC_FAC_GOT_RCOPY) != 0); }
1251  inline void setNoGotRCopy() { state_ &= ~ABC_FAC_GOT_RCOPY; }
1253  inline bool gotUCopy() const { return ((state_ & ABC_FAC_GOT_UCOPY) != 0); }
1254  inline void setNoGotUCopy() { state_ &= ~ABC_FAC_GOT_UCOPY; }
1256  inline bool gotSparse() const { return ((state_ & ABC_FAC_GOT_SPARSE) != 0); }
1259 #else
1260  // force use of copies
1261  inline bool gotLCopy() const { return true; }
1262  inline void setNoGotLCopy() {}
1263  inline void setYesGotLCopy() {}
1264  inline bool gotRCopy() const { return true; }
1265  inline void setNoGotRCopy() {}
1266  inline void setYesGotRCopy() {}
1267  inline bool gotUCopy() const { return true; }
1268  inline void setNoGotUCopy() {}
1269  inline void setYesGotUCopy() {}
1270  inline bool gotSparse() const { return true; }
1271  inline void setNoGotSparse() {}
1272  inline void setYesGotSparse() {}
1273 #endif
1274 #else
1275  // force no use of copies
1276  inline bool gotLCopy() const { return false; }
1277  inline void setNoGotLCopy() {}
1278  inline void setYesGotLCopy() {}
1279  inline bool gotRCopy() const { return false; }
1280  inline void setNoGotRCopy() {}
1281  inline void setYesGotRCopy() {}
1282  inline bool gotUCopy() const { return false; }
1283  inline void setNoGotUCopy() {}
1284  inline void setYesGotUCopy() {}
1285  inline bool gotSparse() const { return false; }
1286  inline void setNoGotSparse() {}
1287  inline void setYesGotSparse() {}
1288 #endif
1289 
1294  //CoinSimplexInt persistenceFlag_;
1296 };
1297 
1298 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
1299 */
double ftranFullAverageAfterL_
Next Row/Column with count.
void scan(CoinIndexedVector *vector) const
Scans region to find nonzeros.
CoinIntArrayWithLength numberInColumnPlus_
Number in each Column including pivoted.
CoinIntArrayWithLength indexColumnU_
Base address for U (may change)
int CoinBigIndex
void(* scatterUpdate)(int, CoinFactorizationDouble, const CoinFactorizationDouble *, double *) SCATTER_ATTRIBUTE
void updateColumnTransposeRDensish(CoinIndexedVector *region) const
Updates part of column transpose (BTRANR) when dense.
void setYesGotLCopy()
Next Row/Column with count.
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.
virtual CoinAbcAnyFactorization * clone() const
Clone.
CoinFactorizationDouble * elementRowUAddress_
Next Row/Column with count.
CoinIntArrayWithLength firstCount_
First Row/Column with count of k, can tell which by offset - Rows then Columns.
void gutsOfCopy(const CoinAbcTypeFactorization &other)
See if worth going sparse.
CoinSimplexInt numberForrestTomlin() const
Length of FT vector.
double ftranCountAfterR_
Next Row/Column with count.
CoinSimplexInt * indexRowRAddress_
Row indices for R.
void updateColumnLSparse(CoinIndexedVector *region) const
Updates part of column (FTRANL) when sparse.
CoinSimplexInt * listAddress_
Next Row/Column with count.
CoinIntArrayWithLength numberInColumn_
Number in each Column.
int maximumPivots() const
Maximum number of pivots between factorizations.
void updateColumnTransposeR(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column transpose (BTRANR)
CoinBigIndex numberL_
Number in L.
void afterPivot(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
After pivoting.
double ftranFTAverageAfterR_
Next Row/Column with count.
void deleteLink(CoinSimplexInt index)
Deletes a link in chain of equal counts.
virtual CoinSimplexInt updateColumnTranspose(CoinIndexedVector &regionSparse) const
Updates one column (BTRAN) from regionSparse2 regionSparse starts as zero and is zero at end Note - i...
void cleanup()
Cleans up at end of factorization.
CoinBigIndex numberL() const
Number in L.
double ftranAverageAfterU_
Next Row/Column with count.
CoinSimplexInt * lastColumnAddress_
Next Row/Column with count.
#define ABC_SMALL
bool gotSparse() const
Next Row/Column with count.
double CoinSimplexDouble
#define checkLinks(x)
void updateColumnLDensish(CoinIndexedVector *region) const
Updates part of column (FTRANL) when densish.
CoinBigIndex lengthAreaL() const
Returns length of L area.
double btranFullAverageAfterL_
Next Row/Column with count.
Abstract base class which also has some scalars so can be used from Dense or Simp.
void printRegion(const CoinIndexedVector &vector, const char *where) const
See if worth going sparse.
CoinSimplexInt sparseThreshold() const
get sparse threshold
const double * denseVector(const CoinIndexedVector &vector) const
Returns number in U area.
CoinSimplexInt numberTrials_
Number of trials before rejection.
double btranCountAfterU_
Next Row/Column with count.
CoinBigIndexArrayWithLength startColumnL_
Start of each column in L.
CoinSimplexInt checkPivot(CoinSimplexDouble saveFromU, CoinSimplexDouble oldPivot) const
Returns accuracy status of replaceColumn returns 0=OK, 1=Probably OK, 2=singular. ...
CoinSimplexInt numberGoodL_
Number factorized in L.
CoinFactorizationDouble * pivotRegionAddress_
Next Row/Column with count.
CoinSimplexInt * nextRowAddress_
Next Row/Column with count.
CoinFactorizationDoubleArrayWithLength elementU_
Elements of U.
void updateColumnUSparse(CoinIndexedVector *regionSparse) const
Updates part of column (FTRANU) when sparse.
#define ABC_FAC_GOT_UCOPY
CoinBigIndex numberElementsL() const
Returns number in L area.
CoinSimplexInt * pivotLinkedForwardsAddress_
Next Row/Column with count.
CoinSimplexInt numberBtranFullCounts_
Next Row/Column with count.
virtual void updateFullColumn(CoinIndexedVector &regionSparse) const
Updates one full column (FTRAN)
bool getColumnSpace(CoinSimplexInt iColumn, CoinSimplexInt extraNeeded)
Gets space for one Column with given length, may have to do compression (returns True if successful)...
CoinIntArrayWithLength permute_
Permutation vector for pivot row order.
CoinFactorizationDoubleArrayWithLength pivotRegion_
Inverses of pivot values.
CoinIntArrayWithLength indexRowU_
Row indices of U.
CoinBigIndex lengthAreaU() const
Returns length of U area.
void setNoGotUCopy()
Next Row/Column with count.
CoinSimplexInt * indexColumnUAddress_
Next Row/Column with count.
CoinIntArrayWithLength nextRow_
Next Row in memory order.
virtual bool wantsTableauColumn() const
Returns true if wants tableauColumn in replaceColumn.
CoinSimplexInt numberFtranFullCounts_
Next Row/Column with count.
CoinSimplexInt lastSlack_
Next Row/Column with count.
void toLongArray(CoinIndexedVector *vector, int which) const
To a work array and associate vector.
CoinSimplexInt * sparseAddress_
Next Row/Column with count.
int numberRows() const
Number of Rows after factorization.
void updateColumnTransposeUSparse(CoinIndexedVector *region) const
Updates part of column transpose (BTRANU) when sparse, assumes index is sorted i.e.
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...
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 show_self() const
Debug show object (shows one representation)
void updateColumnTransposeLByRow(CoinIndexedVector *region) const
Updates part of column transpose (BTRANL) when densish by row.
void updateColumnTransposePFI(CoinIndexedVector *region) const
Updates part of column transpose PFI (BTRAN) (before rest)
virtual CoinSimplexInt factor(AbcSimplex *model)
Does most of factorization.
virtual int updateColumnFTPart1(CoinIndexedVector &regionSparse)
Later take out return codes (apart from +- 1 on FT)
void updateColumnL(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column (FTRANL)
void sort() const
Debug - sort so can compare.
bool gotLCopy() const
Next Row/Column with count.
void gutsOfDestructor(CoinSimplexInt type=1)
The real work of constructors etc 0 just scalars, 1 bit normal.
double ftranFullAverageAfterR_
Next Row/Column with count.
CoinSimplexInt * pivotColumnAddress_
Next Row/Column with count.
CoinSimplexInt sparseThreshold_
Below this use sparse technology - if 0 then no L row copy.
CoinBigIndex * startColumnRAddress_
Next Row/Column with count.
CoinSimplexDouble maximumCoefficient() const
Returns maximum absolute value in factorization.
#define ABC_PARALLEL
CoinSimplexInt leadingDimension_
Leading dimension for dense.
void separateLinks()
Separate out links with same row/column count.
CoinFactorizationDouble * elementU() const
Elements of U.
CoinSimplexInt factorDense()
Does dense phase of factorization return code is &lt;0 error, 0= finished.
double ftranFullCountAfterR_
Next Row/Column with count.
double ftranFTCountInput_
Next Row/Column with count.
virtual CoinSimplexInt * indices() const
Returns array to put basis indices in.
virtual void getAreas(CoinSimplexInt numberRows, CoinSimplexInt numberColumns, CoinBigIndex maximumL, CoinBigIndex maximumU)
Gets space for a factorization, called by constructors.
int wantToGoDense()
After pivoting - returns true if need to go dense.
virtual CoinBigIndex * starts() const
Returns pivot row.
CoinIntArrayWithLength markRow_
Marks rows to be updated.
CoinBigIndex * startRowUAddress_
Next Row/Column with count.
CoinBigIndex numberCompressions_
Number of compressions done.
int * array() const
Get Array.
void almostDestructor()
Delete all stuff (leaves as after CoinAbcFactorization())
CoinBigIndex * startColumnL() const
Start of each column in L.
CoinSimplexInt numberRowsLeft_
Number Rows left (numberRows-numberGood)
void resetStatistics()
Reset all sparsity etc statistics.
double btranAverageAfterR_
Next Row/Column with count.
CoinFactorizationDouble * workAreaAddress_
Next Row/Column with count.
void updateColumnTransposeL(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column transpose (BTRANL)
bool gotRCopy() const
Next Row/Column with count.
CoinSimplexInt * pivotLOrder() const
Returns address of permute region.
CoinBigIndexArrayWithLength convertRowToColumnU_
Converts rows to columns in U.
bool pivotOneOtherRow(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
Pivots when just one other row so faster?
CoinSimplexInt * nextCountAddress_
Next Row/Column with count.
void fromLongArray(CoinIndexedVector *vector) const
From a work array and dis-associate vector.
virtual void updateColumnCpu(CoinIndexedVector &regionSparse, int whichCpu) const
Updates one column (FTRAN)
CoinSimplexInt * pivotLinkedForwards() const
Returns address of permute region.
virtual void updateColumnFTPart2(CoinIndexedVector &regionSparse)
Later take out return codes (apart from +- 1 on FT)
int numberRows_
Number of Rows in factorization.
virtual double checkReplacePart1b(CoinIndexedVector *, int)
Checks if can replace one Column to basis, returns update alpha Fills in region for use later partial...
#define ABC_FAC_GOT_LCOPY
double btranAverageAfterL_
Next Row/Column with count.
CoinSimplexInt numberRowsExtra_
Number of Rows after iterating.
int CoinSimplexInt
void updateColumnTransposeLDensish(CoinIndexedVector *region) const
Updates part of column transpose (BTRANL) when densish by column.
CoinBigIndex lengthU_
Length of U.
double ftranFTCountAfterU_
Next Row/Column with count.
void clearArrays()
Get rid of all memory.
void updateColumnR(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column (FTRANR) without FT update.
CoinIntArrayWithLength numberInRow_
Number in each Row.
CoinSimplexInt * lastCount() const
Previous Row/Column with count.
CoinFactorizationDoubleArrayWithLength elementRowU_
Elements of U by row.
CoinSimplexDouble adjustedAreaFactor() const
Returns areaFactor but adjusted for dense.
CoinBigIndex lastEntryByColumnU_
Last entry by column for U.
CoinSimplexInt factorSparse()
Does sparse phase of factorization return code is &lt;0 error, 0= finished.
CoinSimplexInt numberFtranCounts_
Next Row/Column with count.
void updatePartialUpdate(CoinIndexedVector &partialUpdate)
Update partial Ftran by R update.
void setNumberElementsU(CoinBigIndex value)
Setss number in U area.
double * denseVector() const
Get the vector as a dense vector.
CoinIntArrayWithLength saveColumn_
Columns left to do in a single pivot.
CoinSimplexInt denseThreshold() const
Gets dense threshold.
CoinSimplexInt * firstCountAddress_
Next Row/Column with count.
double * denseVector(CoinIndexedVector &vector) const
Returns number in U area.
CoinSimplexDouble conditionNumber() const
Condition number - product of pivots after factorization.
CoinSimplexInt * lastRowAddress_
Next Row/Column with count.
CoinSimplexInt * saveColumnAddress_
Next Row/Column with count.
CoinBigIndex lengthAreaL_
Length of area reserved for L.
void goSparse2()
Later take out return codes (apart from +- 1 on FT)
void updateColumnPFI(CoinIndexedVector *regionSparse) const
Updates part of column PFI (FTRAN) (after rest)
CoinFactorizationDoubleArrayWithLength denseArea_
Dense area.
CoinSimplexInt numberU_
Number in U.
CoinBigIndex * convertRowToColumnUAddress_
Next Row/Column with count.
CoinBigIndex lastEntryByRowU_
Last entry by row for U.
CoinFactorizationDouble * elementUAddress_
Next Row/Column with count.
CoinIntArrayWithLength lastRow_
Previous Row in memory order.
double preProcess3()
Return largest element.
double ftranFullAverageAfterU_
Next Row/Column with count.
double ftranCountAfterL_
Next Row/Column with count.
CoinSimplexInt * firstCount() const
For equal counts in factorization.
CoinBigIndex * startColumnR() const
Start of columns for R.
void updateColumnU(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column (FTRANU)
double CoinFactorizationDouble
Definition: CoinTypes.hpp:57
CoinSimplexUnsignedInt * workArea2Address_
Next Row/Column with count.
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 * pivotLinkedBackwardsAddress_
Next Row/Column with count.
double ftranFullCountInput_
To decide how to solve.
CoinBigIndex * startColumnU() const
Start of each column in U.
CoinSimplexInt * permute() const
Returns address of permute region.
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, 3=no room, 5 max pivots.
double ftranCountInput_
To decide how to solve.
CoinSimplexInt messageLevel() const
Level of detail of messages.
CoinFactorizationDouble * denseAreaAddress_
Next Row/Column with count.
void preProcess4()
Gets space for a factorization, called by constructors.
double zeroTolerance_
Zero tolerance.
CoinFactorizationDouble * array() const
Get Array.
bool reorderU()
Reorders U so contiguous and in order (if there is space) Returns true if it could.
CoinBigIndex * array() const
Get Array.
virtual CoinSimplexInt updateColumn(CoinIndexedVector &regionSparse) const
This version has same effect as above with FTUpdate==false so number returned is always &gt;=0...
CoinBigIndexArrayWithLength convertColumnToRowU_
Converts columns to rows in U.
virtual CoinSimplexInt * numberInColumn() const
Number of entries in each column.
virtual void checkReplacePart1a(CoinIndexedVector *, int)
Checks if can replace one Column to basis, returns update alpha Fills in region for use later partial...
const double * denseVector(const CoinIndexedVector *vector) const
Returns double * associated with vector.
double btranFullCountInput_
To decide how to solve.
CoinAbcTypeFactorization & operator=(const CoinAbcTypeFactorization &other)
= copy
bool getColumnSpaceIterateR(CoinSimplexInt iColumn, CoinFactorizationDouble value, CoinSimplexInt iRow)
getColumnSpaceIterateR.
double ftranFTAverageAfterU_
Next Row/Column with count.
CoinSimplexInt * pivotLOrderAddress_
Next Row/Column with count.
void setYesGotUCopy()
Next Row/Column with count.
void updateColumnLDense(CoinIndexedVector *region) const
Updates part of column (FTRANL) when dense (i.e. do as inner products)
#define COIN_RESTRICT
CoinIntArrayWithLength indexRowL_
Row indices of L.
CoinSimplexInt numberBtranCounts_
Next Row/Column with count.
CoinSimplexInt * lastCountAddress_
Previous Row/Column with count.
virtual void updateColumnTransposeCpu(CoinIndexedVector &regionSparse, int whichCpu) const
Updates one column (BTRAN)
Indexed Vector.
virtual CoinBigIndex numberElements() const
Total number of elements in factorization.
CoinBigIndex * startRowLAddress_
Next Row/Column with count.
bool getRowSpaceIterate(CoinSimplexInt iRow, CoinSimplexInt extraNeeded)
Gets space for one Row with given length while iterating, may have to do compression (returns True i...
void setYesGotSparse()
Next Row/Column with count.
void updateColumnTransposeUByColumn(CoinIndexedVector *region, CoinSimplexInt smallestIndex) const
Updates part of column transpose (BTRANU) by column assumes index is sorted i.e.
CoinIntArrayWithLength pivotColumn_
Pivot order for each Column.
void doAddresses()
Set up addresses from arrays.
CoinSimplexInt numberRowsSmall_
Size of small inverse.
CoinBigIndex totalElements_
Number of elements in U (to go) or while iterating total overall.
CoinBigIndex lengthR_
Length of R stuff.
void goSparse()
makes a row copy of L for speed and to allow very sparse problems
void pack(CoinIndexedVector *regionFrom, CoinIndexedVector *regionTo) const
Later take out return codes (apart from +- 1 on FT)
double btranCountAfterL_
Next Row/Column with count.
CoinBigIndex baseL() const
Base of L.
virtual void makeNonSingular(CoinSimplexInt *sequence)
Makes a non-singular basis by replacing variables.
CoinIntArrayWithLength sparse_
Sparse regions.
double btranFullCountAfterR_
Next Row/Column with count.
CoinSimplexInt numberRowsExtra() const
Number of Rows after iterating.
CoinFactorizationDouble * elementRAddress_
Elements of R.
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 setNoGotSparse()
Next Row/Column with count.
CoinIntArrayWithLength indexColumnL_
Index of column in row for L.
CoinBigIndex * startRowL() const
Start of each row in L.
void pivotColumnSingleton(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
Does one pivot on Column Singleton in factorization (can&#39;t return false)
CoinSimplexInt * permuteAddress_
Next Row/Column with count.
void updateColumnUDensish(CoinIndexedVector *regionSparse) const
Updates part of column (FTRANU)
double ftranFTAverageAfterL_
Next Row/Column with count.
double btranAverageAfterU_
Next Row/Column with count.
bool storeFT(const CoinIndexedVector *regionFT)
Store update after doing L and R - retuns false if no room.
bool gotUCopy() const
Next Row/Column with count.
virtual CoinSimplexInt * numberInRow() const
Number of entries in each row.
void checkConsistency()
Checks that row and column copies look OK.
CoinFactorizationDouble * elementByRowL() const
Elements in L (row copy)
CoinSimplexInt * indexRowL() const
Row indices of L.
CoinBigIndex lengthAreaU_
Length of area reserved for U.
double btranCountAfterR_
Next Row/Column with count.
CoinSimplexInt * numberInColumnAddress_
Next Row/Column with count.
void updateColumnTransposeUDensish(CoinIndexedVector *region, CoinSimplexInt smallestIndex) const
Updates part of column transpose (BTRANU) when densish, assumes index is sorted i.e.
CoinSimplexInt * pivotLinkedBackwards() const
Forward and backward linked lists (numberRows_+2)
CoinBigIndexArrayWithLength startRowU_
Start of each Row as pointer.
CoinSimplexInt * indexColumnL() const
Index of column in row for L.
void modifyLink(CoinSimplexInt index, CoinSimplexInt count)
Modifies links in chain of equal counts.
double ftranFullCountAfterU_
Next Row/Column with count.
virtual CoinFactorizationDouble * elements() const
Returns array to put basis elements in.
CoinFactorizationDouble * elementLAddress_
Next Row/Column with count.
virtual CoinFactorizationDouble * pivotRegion() const
Returns address of pivot region.
CoinFactorizationDoubleArrayWithLength elementL_
Elements of L.
void checkSparse()
See if worth going sparse.
double ftranFTCountAfterL_
Next Row/Column with count.
CoinUnsignedIntArrayWithLength workArea2_
Second work area.
CoinSimplexInt * indexColumnLAddress_
Next Row/Column with count.
void fromLongArray(int which) const
From a work array and dis-associate vector.
virtual void postProcess(const CoinSimplexInt *sequence, CoinSimplexInt *pivotVariable)
Does post processing on valid factorization - putting variables on correct rows.
CoinIntArrayWithLength lastColumn_
Previous Column in memory order.
CoinSimplexInt initialNumberRows_
Rows first time nonzero.
CoinBigIndexArrayWithLength startRowL_
Start of each row in L.
CoinBigIndex * convertColumnToRowUAddress_
Next Row/Column with count.
void setNoGotRCopy()
Next Row/Column with count.
double btranFullAverageAfterR_
Next Row/Column with count.
virtual int * pivotRow() const
Returns pivot row.
CoinBigIndex numberCompressions() const
Number of compressions done.
double ftranCountAfterU_
Next Row/Column with count.
CoinBigIndex * startColumnLAddress_
Next Row/Column with count.
CoinSimplexInt numberR_
Number in R.
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...
void addLink(CoinSimplexInt index, CoinSimplexInt count)
Adds a link in chain of equal counts.
CoinFactorizationLongDouble * version.
CoinSimplexInt maximumRows_
Maximum rows (ever) (here to use double alignment)
CoinSimplexInt * numberInColumnPlusAddress_
Next Row/Column with count.
double btranFullCountAfterL_
Next Row/Column with count.
CoinBigIndex * startColumnUAddress_
Next Row/Column with count.
virtual CoinSimplexInt updateTwoColumnsFT(CoinIndexedVector &regionFT, CoinIndexedVector &regionOther)
Updates one column (FTRAN) from region2 Tries to do FT update number returned is negative if no room...
CoinBigIndex lengthAreaR_
length of area reserved for R
CoinSimplexInt * nextCount() const
Next Row/Column with count.
void gutsOfInitialize(CoinSimplexInt type)
1 bit - tolerances etc, 2 more, 4 dummy arrays
CoinSimplexInt * numberInRowAddress_
Next Row/Column with count.
CoinBigIndex * version.
CoinBigIndex getColumnSpaceIterate(CoinSimplexInt iColumn, CoinFactorizationDouble value, CoinSimplexInt iRow)
getColumnSpaceIterate.
CoinSimplexInt maximumRowsExtra() const
Maximum of Rows after iterating.
CoinBigIndex numberElementsR() const
Returns number in R area.
void updateColumnTransposeRSparse(CoinIndexedVector *region) const
Updates part of column transpose (BTRANR) when sparse.
CoinSimplexInt messageLevel_
Detail in messages.
This deals with Factorization and Updates.
#define FACTOR_CPU
This deals with Factorization and Updates.
void updateColumnUDense(CoinIndexedVector *regionSparse) const
Updates part of column (FTRANU) when dense (i.e. do as inner products)
CoinBigIndex maximumU_
Maximum space used in U.
void setNoGotLCopy()
Next Row/Column with count.
void unpack(CoinIndexedVector *regionFrom, CoinIndexedVector *regionTo) const
Later take out return codes (apart from +- 1 on FT)
virtual void preProcess()
PreProcesses column ordered copy of basis.
CoinBigIndex firstZeroed_
First place in funny copy zeroed out.
virtual void updateFullColumnTranspose(CoinIndexedVector &regionSparse) const
Updates one full column (BTRAN)
bool pivotRowSingleton(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
Does one pivot on Row Singleton in factorization.
virtual CoinSimplexInt * pivotColumn() const
Returns address of pivotColumn region (also used for permuting)
virtual void checkMarkArrays() const
Later take out return codes (apart from +- 1 on FT)
double ftranAverageAfterL_
Next Row/Column with count.
CoinSimplexInt maximumRowsExtra_
Maximum number of Rows after iterating.
double ftranFullCountAfterL_
Next Row/Column with count.
virtual void updateWeights(CoinIndexedVector &regionSparse) const
Updates one column for dual steepest edge weights (FTRAN)
unsigned char CoinCheckZero
virtual ~CoinAbcTypeFactorization()
Destructor.
CoinBigIndex numberElementsU() const
Returns number in U area.
CoinSimplexInt * indexRowUAddress_
Next Row/Column with count.
CoinFactorizationDouble * version.
CoinBigIndex lengthL_
Length of L.
bool getRowSpace(CoinSimplexInt iRow, CoinSimplexInt extraNeeded)
Gets space for one Row with given length, may have to do compression (returns True if successful)...
void updateColumnTransposeLSparse(CoinIndexedVector *region) const
Updates part of column transpose (BTRANL) when sparse (by Row)
CoinFactorizationDoubleArrayWithLength workArea_
First work area.
CoinSimplexInt denseThreshold_
Dense threshold (here to use double alignment)
virtual CoinSimplexInt updateColumnFT(CoinIndexedVector &regionSparse)
Later take out return codes (apart from +- 1 on FT)
CoinBigIndexArrayWithLength startColumnU_
Start of each column in U.
double btranFullAverageAfterU_
Next Row/Column with count.
CoinFactorizationDouble * elementByRowLAddress_
Next Row/Column with count.
CoinSimplexInt * nextColumnAddress_
Next Row/Column with count.
unsigned int CoinSimplexUnsignedInt
friend void CoinAbcFactorizationUnitTest(const std::string &mpsDir)
void setYesGotRCopy()
Next Row/Column with count.
CoinSimplexInt numberFtranFTCounts_
Next Row/Column with count.
CoinSimplexInt state_
State of saved version and what can be done 0 - nothing saved 1 - saved and can go back to previous s...
CoinAbcTypeFactorization()
Default constructor.
CoinSimplexInt * indexRowU() const
Row indices of U.
CoinBigIndex sizeSparseArray_
Size in bytes of a sparseArray.
double ftranFTCountAfterR_
Next Row/Column with count.
double * denseVector(CoinIndexedVector *vector) const
Returns double * associated with vector.
double btranCountInput_
Next Row/Column with count.
void setDenseThreshold(CoinSimplexInt value)
Sets dense threshold.
double btranFullCountAfterU_
Next Row/Column with count.
CoinSimplexInt maximumMaximumPivots_
Maximum maximum pivots.
CoinSimplexInt * indexRowLAddress_
Next Row/Column with count.
double ftranAverageAfterR_
Next Row/Column with count.
CoinFactorizationDoubleArrayWithLength elementByRowL_
Elements in L (row copy)
void updateColumnTransposeU(CoinIndexedVector *region, CoinSimplexInt smallestIndex, CoinAbcStatistics &statistics) const
Updates part of column transpose (BTRANU), assumes index is sorted i.e.
#define ABC_FAC_GOT_RCOPY
CoinCheckZero * markRowAddress_
Next Row/Column with count.
#define ABC_FAC_GOT_SPARSE
CoinIntArrayWithLength nextColumn_
Next Column in memory order.
int scan()
Scan dense region and set up indices (returns number found)
bool spaceForForrestTomlin() const
True if FT update and space.