CoinAbcBaseFactorization.hpp
Go to the documentation of this file.
1 /* $Id: CoinAbcBaseFactorization.hpp 1910 2013-01-27 02:00:13Z stefan $ */
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 
28 class CoinAbcTypeFactorization : public
30 {
31  friend void CoinAbcFactorizationUnitTest( const std::string & mpsDir );
32 
33 public:
34 
43 
45  virtual ~CoinAbcTypeFactorization ( );
47  virtual CoinAbcAnyFactorization * clone() const ;
49  void almostDestructor();
51  void show_self ( ) const;
53  void sort ( ) const;
57 
62 
64 
67  inline CoinSimplexInt *permute ( ) const {
69  return NULL; //permute_.array();
70  }
72  virtual inline CoinSimplexInt * indices() const
73  { return indexRowU_.array();}
75  virtual inline CoinSimplexInt *pivotColumn ( ) const {
76  return pivotColumn_.array();
77  }
79  virtual inline CoinFactorizationDouble *pivotRegion ( ) const {
80  return pivotRegionAddress_;
81  }
82 #if ABC_SMALL<2
83  inline CoinBigIndex * startRowL() const
85  { return startRowL_.array();}
86 #endif
87 
89  inline CoinBigIndex * startColumnL() const
90  { return startColumnL_.array();}
91 
92 #if ABC_SMALL<2
93  inline CoinSimplexInt * indexColumnL() const
95  { return indexColumnL_.array();}
96 #endif
97 
99  inline CoinSimplexInt * indexRowL() const
100  { return indexRowL_.array();}
101 
102 #if ABC_SMALL<2
103  inline CoinFactorizationDouble * elementByRowL() const
105  { return elementByRowL_.array();}
106 #endif
107 
111  { return firstCount_.array()+numberRows_+1;}
113  { return firstCount_.array()+2*numberRows_+3;}
114  inline CoinSimplexInt * pivotLOrder() const
115  { return firstCount_.array();}
116 #if ABC_SMALL<0
117 #define ABC_USE_FUNCTION_POINTERS 0
118 #define SMALL_PERMUTE
119 #endif
120 #ifdef ABC_USE_FUNCTION_POINTERS
122 #if ABC_USE_FUNCTION_POINTERS
123  typedef struct {
124  scatterUpdate functionPointer;
125  CoinBigIndex offset;
126  int number;
127  } scatterStruct;
128 #else
129  typedef struct {
130  CoinBigIndex offset;
131  int number;
132  } scatterStruct;
133 #endif
134  inline scatterStruct * scatterUColumn() const
136  { return scatterPointersUColumnAddress_;}
137 #endif
138 
140 
143  inline CoinSimplexInt * firstCount() const
144  { return firstCount_.array();}
145 
147  inline CoinSimplexInt * nextCount() const
148  { return firstCount_.array()+numberRows_+2;}
149 
151  inline CoinSimplexInt * lastCount() const
152  { return firstCount_.array()+3*numberRows_+2;}
153 
155  inline CoinSimplexInt numberRowsExtra ( ) const {
156  return numberRowsExtra_;
157  }
159  inline CoinBigIndex numberL() const
160  { return numberL_;}
161 
163  inline CoinBigIndex baseL() const
164  { return baseL_;}
166  inline CoinSimplexInt maximumRowsExtra ( ) const {
167  return maximumRowsExtra_;
168  }
170  virtual inline CoinBigIndex numberElements ( ) const {
171  return totalElements_;
172  }
176  }
180  inline CoinSimplexInt messageLevel ( ) const {
181  return messageLevel_ ;
182  }
183  void messageLevel ( CoinSimplexInt value );
185  virtual void maximumPivots ( CoinSimplexInt value );
186 
187 #if ABC_SMALL<4
188  inline CoinSimplexInt denseThreshold() const
190  { return denseThreshold_;}
193  { denseThreshold_ = value;}
194 #endif
197 #if 0
198  inline bool forrestTomlin() const
200  { return doForrestTomlin_;}
201  inline void setForrestTomlin(bool value)
202  { doForrestTomlin_=value;}
203 #endif
204  inline bool spaceForForrestTomlin() const
206  {
208  CoinBigIndex space = lengthAreaU_ - ( start + numberRowsExtra_ );
209  return (space>=0); //&&doForrestTomlin_;
210  }
212 
215 
216 
218  inline CoinBigIndex numberElementsU ( ) const {
219  return lengthU_;
220  }
222  inline void setNumberElementsU(CoinBigIndex value)
223  { lengthU_ = value; }
225  inline CoinBigIndex lengthAreaU ( ) const {
226  return lengthAreaU_;
227  }
229  inline CoinBigIndex numberElementsL ( ) const {
230  return lengthL_;
231  }
233  inline CoinBigIndex lengthAreaL ( ) const {
234  return lengthAreaL_;
235  }
237  inline CoinBigIndex numberElementsR ( ) const {
238  return lengthR_;
239  }
242  { return numberCompressions_;}
244  //virtual CoinSimplexInt * pivotRow() const;
246  //virtual CoinFactorizationDouble * workArea() const;
248  //virtual CoinSimplexInt * intWorkArea() const;
250  virtual inline CoinBigIndex * starts() const
251  { return startColumnU_.array();}
253  virtual inline CoinSimplexInt * numberInRow() const
254  { return numberInRow_.array();}
256  virtual inline CoinSimplexInt * numberInColumn() const
257  { return numberInColumn_.array();}
259  virtual inline CoinFactorizationDouble * elements() const
260  { return elementU_.array();}
262  inline CoinBigIndex * startColumnR() const
263  {return reinterpret_cast<CoinBigIndex *>(firstCount_.array()+3*numberRows_+4);}
266  { return elementU_.array();}
268  inline CoinSimplexInt * indexRowU() const
269  { return indexRowU_.array();}
271  inline CoinBigIndex * startColumnU() const
272  { return startColumnU_.array();}
273 #if COIN_BIG_DOUBLE==1
274  void toLongArray(CoinIndexedVector * vector,int which) const;
277  void fromLongArray(CoinIndexedVector * vector) const;
279  void fromLongArray(int which) const;
281  long double * denseVector(CoinIndexedVector * vector) const;
283  long double * denseVector(CoinIndexedVector & vector) const;
285  const long double * denseVector(const CoinIndexedVector * vector) const;
287  const long double * denseVector(const CoinIndexedVector & vector) const;
289  void scan(CoinIndexedVector * vector) const;
291  void clearHiddenArrays();
292 #else
293  inline double * denseVector(CoinIndexedVector * vector) const
295  {return vector->denseVector();}
296  inline double * denseVector(CoinIndexedVector & vector) const
297  {return vector.denseVector();}
299  inline const double * denseVector(const CoinIndexedVector * vector) const
300  {return vector->denseVector();}
301  inline const double * denseVector(const CoinIndexedVector & vector) const
302  {return vector.denseVector();}
304  inline void toLongArray(CoinIndexedVector * vector,int which) const {}
306  inline void fromLongArray(CoinIndexedVector * vector) const {}
308  inline void fromLongArray(int which) const {}
310  inline void scan(CoinIndexedVector * vector) const
311  {vector->scan(0,numberRows_,zeroTolerance_);}
312 #endif
313 #ifdef ABC_ORDERED_FACTORIZATION
314  void permuteInForFtran(CoinIndexedVector & regionSparse,bool full=false) const ;
317  void permuteInForBtranAndMultiply(CoinIndexedVector & regionSparse, bool full=false) const ;
319  void permuteOutForBtran(CoinIndexedVector & regionSparse) const ;
320 #endif
321 
326  //inline CoinSimplexInt persistenceFlag() const
327  //{ return persistenceFlag_;}
329 
332 #if 0
333 
337  virtual int checkReplace ( const AbcSimplex * model,
338  CoinIndexedVector * regionSparse,
339  int pivotRow,
340  CoinSimplexDouble & pivotCheck,
341  double acceptablePivot = 1.0e-8);
346  virtual CoinSimplexInt replaceColumn ( CoinIndexedVector * regionSparse,
348  CoinSimplexDouble pivotCheck ,
349  bool skipBtranU=false,
350  CoinSimplexDouble acceptablePivot=1.0e-8);
351 #endif
352 
356  virtual
357 #ifdef ABC_LONG_FACTORIZATION
358  long
359 #endif
360  double checkReplacePart1 ( CoinIndexedVector * regionSparse,
361  int pivotRow);
366  virtual
367 #ifdef ABC_LONG_FACTORIZATION
368  long
369 #endif
370  double checkReplacePart1 ( CoinIndexedVector * regionSparse,
371  CoinIndexedVector * partialUpdate,
372  int pivotRow);
373 #ifdef MOVE_REPLACE_PART1A
374 
378  virtual void checkReplacePart1a ( CoinIndexedVector * regionSparse,
379  int pivotRow);
380  virtual
381 #ifdef ABC_LONG_FACTORIZATION
382  long
383 #endif
384  double checkReplacePart1b ( CoinIndexedVector * regionSparse,
385  int pivotRow);
386 #endif
387 
389  virtual int checkReplacePart2 ( int pivotRow,
390  CoinSimplexDouble btranAlpha,
391  double ftranAlpha,
392 #ifdef ABC_LONG_FACTORIZATION
393  long
394 #endif
395  double ftAlpha,
396  double acceptablePivot = 1.0e-8);
399  virtual void replaceColumnPart3 ( const AbcSimplex * model,
400  CoinIndexedVector * regionSparse,
401  CoinIndexedVector * tableauColumn,
402  int pivotRow,
403 #ifdef ABC_LONG_FACTORIZATION
404  long
405 #endif
406  double alpha );
409  virtual void replaceColumnPart3 ( const AbcSimplex * model,
410  CoinIndexedVector * regionSparse,
411  CoinIndexedVector * tableauColumn,
412  CoinIndexedVector * partialUpdate,
413  int pivotRow,
414 #ifdef ABC_LONG_FACTORIZATION
415  long
416 #endif
417  double alpha );
418 #ifdef EARLY_FACTORIZE
419  virtual int replaceColumns ( const AbcSimplex * model,
421  CoinIndexedVector & stuff,
422  int firstPivot,int lastPivot,bool cleanUp);
423 #endif
424  void updatePartialUpdate(CoinIndexedVector & partialUpdate);
427  inline virtual bool wantsTableauColumn() const
428  {return false;}
432  int replaceColumnU ( CoinIndexedVector * regionSparse,
433  CoinBigIndex * deletedPosition,
434  CoinSimplexInt * deletedColumns,
437 
440 
442 
448  virtual CoinSimplexInt updateColumnFT ( CoinIndexedVector & regionSparse);
449  virtual int updateColumnFTPart1 ( CoinIndexedVector & regionSparse) ;
450  virtual void updateColumnFTPart2 ( CoinIndexedVector & regionSparse) ;
454  virtual void updateColumnFT ( CoinIndexedVector & regionSparseFT,
455  CoinIndexedVector & partialUpdate,
456  int which);
459  virtual CoinSimplexInt updateColumn ( CoinIndexedVector & regionSparse) const;
466  CoinIndexedVector & regionOther);
471  virtual CoinSimplexInt updateColumnTranspose ( CoinIndexedVector & regionSparse) const;
473  virtual void updateFullColumn ( CoinIndexedVector & regionSparse) const;
475  virtual void updateFullColumnTranspose ( CoinIndexedVector & regionSparse) const;
477  virtual void updateWeights ( CoinIndexedVector & regionSparse) const;
479  virtual void updateColumnCpu ( CoinIndexedVector & regionSparse,int whichCpu) const;
481  virtual void updateColumnTransposeCpu ( CoinIndexedVector & regionSparse,int whichCpu) const;
482  void unpack ( CoinIndexedVector * regionFrom,
483  CoinIndexedVector * regionTo) const;
484  void pack ( CoinIndexedVector * regionFrom,
485  CoinIndexedVector * regionTo) const;
487  inline void goSparse() {}
488  void goSparse2();
489 #ifndef NDEBUG
490  virtual void checkMarkArrays() const;
491 #endif
492 #if ABC_SMALL<2
493 
495  { return sparseThreshold_;}
496 #endif
497 
498  void sparseThreshold ( CoinSimplexInt value );
500 
505  inline void clearArrays()
507  { gutsOfDestructor();}
509 
510  void checkSparse();
513  void gutsOfDestructor(CoinSimplexInt type=1);
515  void gutsOfInitialize(CoinSimplexInt type);
516  void gutsOfCopy(const CoinAbcTypeFactorization &other);
517 
519  void resetStatistics();
520  void printRegion(const CoinIndexedVector & vector, const char * where) const;
521 
523 
525  virtual void getAreas ( CoinSimplexInt numberRows,
527  CoinSimplexInt numberColumns,
528  CoinBigIndex maximumL,
529  CoinBigIndex maximumU );
530 
532  virtual void preProcess ( );
533  void preProcess (CoinSimplexInt );
535  double preProcess3 ( );
536  void preProcess4 ( );
538  virtual CoinSimplexInt factor (AbcSimplex * model);
539 #ifdef EARLY_FACTORIZE
540  virtual int factorize (AbcSimplex * model, CoinIndexedVector & stuff);
542 #endif
543  virtual void postProcess(const CoinSimplexInt * sequence, CoinSimplexInt * pivotVariable);
546  virtual void makeNonSingular(CoinSimplexInt * sequence);
547 protected:
554 
568  int wantToGoDense();
569 
574  bool getColumnSpace ( CoinSimplexInt iColumn,
575  CoinSimplexInt extraNeeded );
576 
579  bool reorderU();
584  CoinSimplexInt iRow);
591  CoinSimplexInt iRow);
595  bool getRowSpace ( CoinSimplexInt iRow, CoinSimplexInt extraNeeded );
596 
601  CoinSimplexInt extraNeeded );
603  void checkConsistency ( );
604 //#define CHECK_LINKS
605 #ifdef CHECK_LINKS
606  void checkLinks(int x=0);
607 #else
608 # define checkLinks(x)
609 #endif
610  inline void addLink ( CoinSimplexInt index, CoinSimplexInt count ) {
615  CoinSimplexInt next = firstCount[count];
616  firstCount[count] = index;
617  nextCount[index] = next;
618  lastCount[index] = count-numberRows_-2; // points to firstCount[count]
619  if (next>=0)
620  lastCount[next] = index;
621  }
623  inline void deleteLink ( CoinSimplexInt index ) {
626  CoinSimplexInt next = nextCount[index];
627  CoinSimplexInt last = lastCount[index];
628  assert (next!=index);
629  assert (last!=index);
630  if (next>=0)
631  lastCount[next] = last;
632  if (last>=0) {
633  nextCount[last] = next;
634  } else {
635  int count=last+numberRows_+2;
637  firstCount[count]=next;
638  }
639  }
641  inline void modifyLink ( CoinSimplexInt index, CoinSimplexInt count ) {
645  CoinSimplexInt next2 = firstCount[count];
646  if (next2==index)
647  return;
648  firstCount[count] = index;
649  CoinSimplexInt next = nextCount[index];
650  CoinSimplexInt last = lastCount[index];
651  assert (next!=index);
652  assert (last!=index);
653  nextCount[index] = next2;
654  lastCount[index] = count-numberRows_-2; // points to firstCount[count]
655  if (next>=0)
656  lastCount[next] = last;
657  if (next2>=0)
658  lastCount[next2] = index;
659  if (last>=0) {
660  nextCount[last] = next;
661  } else {
662  int count=last+numberRows_+2;
663  firstCount[count]=next;
664  }
665  }
667  void separateLinks();
670  void cleanup ( );
672  void doAddresses();
673 
675  void updateColumnL ( CoinIndexedVector * region
676 #if ABC_SMALL<2
677  , CoinAbcStatistics & statistics
678 #endif
679 #if ABC_PARALLEL
680  ,int whichSparse=0
681 #endif
682  ) const;
684  void updateColumnLDensish ( CoinIndexedVector * region ) const;
686  void updateColumnLDense ( CoinIndexedVector * region ) const;
688  void updateColumnLSparse ( CoinIndexedVector * region
689 #if ABC_PARALLEL
690  ,int whichSparse
691 #endif
692  ) const;
693 
695  void updateColumnR ( CoinIndexedVector * region
696 #if ABC_SMALL<2
697  , CoinAbcStatistics & statistics
698 #endif
699 #if ABC_PARALLEL
700  ,int whichSparse=0
701 #endif
702  ) const;
704  bool storeFT(
705 #if ABC_SMALL<3
706  const
707 #endif
708  CoinIndexedVector * regionFT);
710  void updateColumnU ( CoinIndexedVector * region
711 #if ABC_SMALL<2
712  , CoinAbcStatistics & statistics
713 #endif
714 #if ABC_PARALLEL
715  ,int whichSparse=0
716 #endif
717  ) const;
718 
720  void updateColumnUSparse ( CoinIndexedVector * regionSparse
721 #if ABC_PARALLEL
722  ,int whichSparse
723 #endif
724  ) const;
726  void updateColumnUDensish ( CoinIndexedVector * regionSparse) const;
728  void updateColumnUDense ( CoinIndexedVector * regionSparse) const;
731  CoinSimplexInt & numberNonZero1,
733  CoinSimplexInt * COIN_RESTRICT index1,
734  CoinSimplexInt & numberNonZero2,
736  CoinSimplexInt * COIN_RESTRICT index2) const;
738  void updateColumnPFI ( CoinIndexedVector * regionSparse) const;
740  void updateColumnTransposePFI ( CoinIndexedVector * region) const;
744  CoinSimplexInt smallestIndex
745 #if ABC_SMALL<2
746  , CoinAbcStatistics & statistics
747 #endif
748 #if ABC_PARALLEL
749  ,int whichCpu
750 #endif
751  ) const;
755  CoinSimplexInt smallestIndex) const;
759 #if ABC_PARALLEL
760  ,int whichSparse
761 #endif
762  ) const;
766  CoinSimplexInt smallestIndex) const;
767 
770 #if ABC_SMALL<2
771  , CoinAbcStatistics & statistics
772 #endif
773  ) const;
775  void updateColumnTransposeRDensish ( CoinIndexedVector * region ) const;
777  void updateColumnTransposeRSparse ( CoinIndexedVector * region ) const;
778 
781 #if ABC_SMALL<2
782  , CoinAbcStatistics & statistics
783 #endif
784 #if ABC_PARALLEL
785  ,int whichSparse
786 #endif
787  ) const;
789  void updateColumnTransposeLDensish ( CoinIndexedVector * region ) const;
791  void updateColumnTransposeLByRow ( CoinIndexedVector * region ) const;
794 #if ABC_PARALLEL
795  ,int whichSparse
796 #endif
797  ) const;
798 public:
805 protected:
812  CoinBigIndex pivotRowPosition,
813  CoinBigIndex pivotColumnPosition,
816  CoinSimplexInt increment2,
817  int * COIN_RESTRICT markRow );
818  int pivot ( CoinSimplexInt & pivotRow,
820  CoinBigIndex pivotRowPosition,
821  CoinBigIndex pivotColumnPosition,
822  int * COIN_RESTRICT markRow );
823 #if ABC_SMALL<2
824 #define CONVERTROW 2
825 #elif ABC_SMALL<4
826 #else
827 #undef ABC_DENSE_CODE
828 #define ABC_DENSE_CODE 0
829 #endif
830 
832 protected:
834 
844 #ifdef ABC_USE_FUNCTION_POINTERS
845  scatterStruct * scatterPointersUColumnAddress_;
847  CoinFactorizationDouble * elementUColumnPlusAddress_;
848 #endif
850 #if CONVERTROW
852 #if CONVERTROW>1
854 #endif
855 #endif
856 #if ABC_SMALL<2
858 #endif
872  //CoinSimplexInt * saveColumnAddress2_;
878 #if ABC_SMALL<2
880 #endif
891 #if ABC_SMALL<4
893 #endif
897 #ifdef SMALL_PERMUTE
898  CoinSimplexInt * fromSmallToBigRow_;
899  CoinSimplexInt * fromSmallToBigColumn_;
900 #endif
916 #if ABC_SMALL<2
919 #endif
944 #ifdef ABC_USE_FUNCTION_POINTERS
945  CoinBigIndex lastEntryByColumnUPlus_;
948  CoinBigIndex lengthAreaUPlus_;
949 #endif
954 #if ABC_SMALL<4
957 #endif
958 #if COIN_BIG_DOUBLE==1
962  mutable CoinIndexedVector * associatedVector_[FACTOR_CPU];
963 #endif
1001 #ifdef ABC_USE_FUNCTION_POINTERS
1002  CoinArbitraryArrayWithLength scatterUColumn_;
1004 #endif
1005 #if CONVERTROW
1008 #if CONVERTROW>1
1011 #endif
1012 #endif
1013 #if ABC_SMALL<2
1016 #endif
1023 #if ABC_SMALL<4
1026 #endif
1031 #if ABC_SMALL<2
1040 #endif
1045  // last slack pivot row
1047 #if ABC_SMALL<2
1048  mutable double ftranCountInput_;
1050  mutable double ftranCountAfterL_;
1051  mutable double ftranCountAfterR_;
1052  mutable double ftranCountAfterU_;
1056 #if FACTORIZATION_STATISTICS
1057  double ftranTwiddleFactor1_;
1058  double ftranTwiddleFactor2_;
1059 #endif
1061 #endif
1064 #if ABC_SMALL<2
1065  mutable double ftranFTCountInput_;
1066  mutable double ftranFTCountAfterL_;
1067  mutable double ftranFTCountAfterR_;
1068  mutable double ftranFTCountAfterU_;
1072 #if FACTORIZATION_STATISTICS
1073  double ftranFTTwiddleFactor1_;
1074  double ftranFTTwiddleFactor2_;
1075 #endif
1077 #endif
1078 #if ABC_SMALL<4
1081 #endif
1082 #if ABC_SMALL<2
1083  mutable double btranCountInput_;
1084  mutable double btranCountAfterU_;
1085  mutable double btranCountAfterR_;
1086  mutable double btranCountAfterL_;
1090 #if FACTORIZATION_STATISTICS
1091  double btranTwiddleFactor1_;
1092  double btranTwiddleFactor2_;
1093 #endif
1095 #endif
1098 #if ABC_SMALL<2
1099  mutable double ftranFullCountInput_;
1101  mutable double ftranFullCountAfterL_;
1102  mutable double ftranFullCountAfterR_;
1103  mutable double ftranFullCountAfterU_;
1107 #if FACTORIZATION_STATISTICS
1108  double ftranFullTwiddleFactor1_;
1109  double ftranFullTwiddleFactor2_;
1110 #endif
1112 #endif
1115 #if ABC_SMALL<2
1116  mutable double btranFullCountInput_;
1118  mutable double btranFullCountAfterL_;
1119  mutable double btranFullCountAfterR_;
1120  mutable double btranFullCountAfterU_;
1124 #if FACTORIZATION_STATISTICS
1125  double btranFullTwiddleFactor1_;
1126  double btranFullTwiddleFactor2_;
1127 #endif
1129 #endif
1130 
1139 public:
1140 #if ABC_SMALL<2
1141 #if ABC_SMALL>=0
1142  inline bool gotLCopy() const {return ((state_&ABC_FAC_GOT_LCOPY)!=0);}
1145  inline bool gotRCopy() const {return ((state_&ABC_FAC_GOT_RCOPY)!=0);}
1148  inline bool gotUCopy() const {return ((state_&ABC_FAC_GOT_UCOPY)!=0);}
1151  inline bool gotSparse() const {return ((state_&ABC_FAC_GOT_SPARSE)!=0);}
1154 #else
1155  // force use of copies
1156  inline bool gotLCopy() const {return true;}
1157  inline void setNoGotLCopy() {}
1158  inline void setYesGotLCopy() {}
1159  inline bool gotRCopy() const {return true;}
1160  inline void setNoGotRCopy() {}
1161  inline void setYesGotRCopy() {}
1162  inline bool gotUCopy() const {return true;}
1163  inline void setNoGotUCopy() {}
1164  inline void setYesGotUCopy() {}
1165  inline bool gotSparse() const {return true;}
1166  inline void setNoGotSparse() {}
1167  inline void setYesGotSparse() {}
1168 #endif
1169 #else
1170  // force no use of copies
1171  inline bool gotLCopy() const {return false;}
1172  inline void setNoGotLCopy() {}
1173  inline void setYesGotLCopy() {}
1174  inline bool gotRCopy() const {return false;}
1175  inline void setNoGotRCopy() {}
1176  inline void setYesGotRCopy() {}
1177  inline bool gotUCopy() const {return false;}
1178  inline void setNoGotUCopy() {}
1179  inline void setYesGotUCopy() {}
1180  inline bool gotSparse() const {return false;}
1181  inline void setNoGotSparse() {}
1182  inline void setYesGotSparse() {}
1183 #endif
1184 
1189  //CoinSimplexInt persistenceFlag_;
1191 };
1192 
1193 
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)
typedef void(COINLINKAGE_CB *clp_callback)(Clp_Simplex *model
typedef for user call back.
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.