Clp 1.16.9
Loading...
Searching...
No Matches
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
30{
31 friend void CoinAbcFactorizationUnitTest( const std::string & mpsDir );
32
33public:
34
42 CoinAbcTypeFactorization ( const CoinFactorization &other);
43
47 virtual CoinAbcAnyFactorization * clone() const ;
51 void show_self ( ) const;
53 void sort ( ) const;
55 CoinAbcTypeFactorization & operator = ( const CoinAbcTypeFactorization & other );
57
62
64
68 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 {
81 }
82#if ABC_SMALL<2
84 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
95 { return indexColumnL_.array();}
96#endif
97
99 inline CoinSimplexInt * indexRowL() const
100 { return indexRowL_.array();}
101
102#if ABC_SMALL<2
104 inline CoinFactorizationDouble * elementByRowL() const
105 { return elementByRowL_.array();}
106#endif
111 { return firstCount_.array()+numberRows_+1;}
113 { return firstCount_.array()+2*numberRows_+3;}
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
121 typedef void (*scatterUpdate) (int,CoinFactorizationDouble,const CoinFactorizationDouble *, CoinFactorizationDouble *);
122#if ABC_USE_FUNCTION_POINTERS
123 typedef struct {
124 scatterUpdate functionPointer;
125 CoinBigIndex offset;
126 int number;
128#else
129 typedef struct {
130 CoinBigIndex offset;
131 int number;
133#endif
135 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
156 return numberRowsExtra_;
157 }
159 inline CoinBigIndex numberL() const
160 { return numberL_;}
161
163 inline CoinBigIndex baseL() const
164 { return baseL_;}
167 return maximumRowsExtra_;
168 }
170 virtual inline CoinBigIndex numberElements ( ) const {
171 return totalElements_;
172 }
175 return numberInColumn_.array()[numberRowsExtra_];
176 }
180 inline CoinSimplexInt messageLevel ( ) const {
181 return messageLevel_ ;
182 }
185 virtual void maximumPivots ( CoinSimplexInt value );
186
187#if ABC_SMALL<4
190 { return denseThreshold_;}
193 { denseThreshold_ = value;}
194#endif
197#if 0
199 inline bool forrestTomlin() const
200 { return doForrestTomlin_;}
201 inline void setForrestTomlin(bool value)
202 { doForrestTomlin_=value;}
203#endif
205 inline bool spaceForForrestTomlin() const
206 {
207 CoinBigIndex start = lastEntryByColumnU_;
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 }
241 inline CoinBigIndex numberCompressions() const
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);}
265 inline CoinFactorizationDouble * elementU() const
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
275 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
294 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
315 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
326 //inline CoinSimplexInt persistenceFlag() const
327 //{ return persistenceFlag_;}
329
332#if 0
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,
347 CoinSimplexInt pivotRow,
348 CoinSimplexDouble pivotCheck ,
349 bool skipBtranU=false,
350 CoinSimplexDouble acceptablePivot=1.0e-8);
351#endif
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
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
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
420 virtual int replaceColumns ( const AbcSimplex * model,
421 CoinIndexedVector & stuff,
422 int firstPivot,int lastPivot,bool cleanUp);
423#endif
425 void updatePartialUpdate(CoinIndexedVector & partialUpdate);
427 inline virtual bool wantsTableauColumn() const
428 {return false;}
432 int replaceColumnU ( CoinIndexedVector * regionSparse,
433 CoinBigIndex * deletedPosition,
434 CoinSimplexInt * deletedColumns,
435 CoinSimplexInt pivotRow);
437
441
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;
465 virtual CoinSimplexInt updateTwoColumnsFT ( CoinIndexedVector & regionFT,
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
495 { return sparseThreshold_;}
496#endif
500
501
506 inline void clearArrays()
507 { gutsOfDestructor();}
509
517
520 void printRegion(const CoinIndexedVector & vector, const char * where) const;
521
523
526 virtual void getAreas ( CoinSimplexInt numberRows,
527 CoinSimplexInt numberColumns,
528 CoinBigIndex maximumL,
529 CoinBigIndex maximumU );
530
532 virtual void preProcess ( );
535 double preProcess3 ( );
536 void preProcess4 ( );
539#ifdef EARLY_FACTORIZE
541 virtual int factorize (AbcSimplex * model, CoinIndexedVector & stuff);
542#endif
544 virtual void postProcess(const CoinSimplexInt * sequence, CoinSimplexInt * pivotVariable);
546 virtual void makeNonSingular(CoinSimplexInt * sequence);
547protected:
554
557 CoinSimplexInt pivotColumn );
560 CoinSimplexInt pivotColumn );
563 CoinSimplexInt pivotColumn );
566 CoinSimplexInt pivotColumn );
569
575 CoinSimplexInt extraNeeded );
576
579 bool reorderU();
583 bool getColumnSpaceIterateR ( CoinSimplexInt iColumn, CoinFactorizationDouble value,
584 CoinSimplexInt iRow);
590 CoinBigIndex getColumnSpaceIterate ( CoinSimplexInt iColumn, CoinFactorizationDouble value,
591 CoinSimplexInt iRow);
595 bool getRowSpace ( CoinSimplexInt iRow, CoinSimplexInt extraNeeded );
596
601 CoinSimplexInt extraNeeded );
604//#define CHECK_LINKS
605#ifdef CHECK_LINKS
606 void checkLinks(int x=0);
607#else
608# define checkLinks(x)
609#endif
611 inline void addLink ( CoinSimplexInt index, CoinSimplexInt count ) {
613 CoinSimplexInt * COIN_RESTRICT firstCount = this->firstCount();
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;
636 CoinSimplexInt * COIN_RESTRICT firstCount = this->firstCount();
637 firstCount[count]=next;
638 }
639 }
641 inline void modifyLink ( CoinSimplexInt index, CoinSimplexInt count ) {
644 CoinSimplexInt * COIN_RESTRICT firstCount = this->firstCount();
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 }
670 void cleanup ( );
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;
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,
732 CoinFactorizationDouble * COIN_RESTRICT region1,
734 CoinSimplexInt & numberNonZero2,
735 CoinFactorizationDouble * COIN_RESTRICT region2,
736 CoinSimplexInt * COIN_RESTRICT index2) const;
738 void updateColumnPFI ( CoinIndexedVector * regionSparse) const;
740 void updateColumnTransposePFI ( CoinIndexedVector * region) const;
743 void updateColumnTransposeU ( CoinIndexedVector * region,
744 CoinSimplexInt smallestIndex
745#if ABC_SMALL<2
746 , CoinAbcStatistics & statistics
747#endif
748#if ABC_PARALLEL
749 ,int whichCpu
750#endif
751 ) const;
754 void updateColumnTransposeUDensish ( CoinIndexedVector * region,
755 CoinSimplexInt smallestIndex) const;
758 void updateColumnTransposeUSparse ( CoinIndexedVector * region
759#if ABC_PARALLEL
760 ,int whichSparse
761#endif
762 ) const;
765 void updateColumnTransposeUByColumn ( CoinIndexedVector * region,
766 CoinSimplexInt smallestIndex) const;
767
769 void updateColumnTransposeR ( CoinIndexedVector * region
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
780 void updateColumnTransposeL ( CoinIndexedVector * region
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;
793 void updateColumnTransposeLSparse ( CoinIndexedVector * region
794#if ABC_PARALLEL
795 ,int whichSparse
796#endif
797 ) const;
798public:
803 CoinSimplexInt replaceColumnPFI ( CoinIndexedVector * regionSparse,
804 CoinSimplexInt pivotRow, CoinSimplexDouble alpha);
805protected:
810 int pivot ( CoinSimplexInt pivotRow,
811 CoinSimplexInt pivotColumn,
812 CoinBigIndex pivotRowPosition,
813 CoinBigIndex pivotColumnPosition,
814 CoinFactorizationDouble * COIN_RESTRICT work,
816 CoinSimplexInt increment2,
817 int * COIN_RESTRICT markRow );
818 int pivot ( CoinSimplexInt & pivotRow,
819 CoinSimplexInt & pivotColumn,
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
833protected:
834
839 CoinFactorizationDouble * pivotRegionAddress_;
840 CoinFactorizationDouble * elementUAddress_;
844#ifdef ABC_USE_FUNCTION_POINTERS
846 scatterStruct * scatterPointersUColumnAddress_;
847 CoinFactorizationDouble * elementUColumnPlusAddress_;
848#endif
849 CoinBigIndex * startColumnUAddress_;
850#if CONVERTROW
851 CoinBigIndex * convertRowToColumnUAddress_;
852#if CONVERTROW>1
853 CoinBigIndex * convertColumnToRowUAddress_;
854#endif
855#endif
856#if ABC_SMALL<2
857 CoinFactorizationDouble * elementRowUAddress_;
858#endif
859 CoinBigIndex * startRowUAddress_;
872 //CoinSimplexInt * saveColumnAddress2_;
875 CoinFactorizationDouble * elementLAddress_;
877 CoinBigIndex * startColumnLAddress_;
878#if ABC_SMALL<2
879 CoinBigIndex * startRowLAddress_;
880#endif
884 CoinBigIndex * startColumnRAddress_;
886 CoinFactorizationDouble *elementRAddress_;
890 CoinFactorizationDouble * elementByRowLAddress_;
891#if ABC_SMALL<4
892 CoinFactorizationDouble * denseAreaAddress_;
893#endif
894 CoinFactorizationDouble * workAreaAddress_;
897#ifdef SMALL_PERMUTE
898 CoinSimplexInt * fromSmallToBigRow_;
899 CoinSimplexInt * fromSmallToBigColumn_;
900#endif
913 CoinBigIndex totalElements_;
915 CoinBigIndex firstZeroed_;
916#if ABC_SMALL<2
919#endif
923 CoinBigIndex lengthR_;
925 CoinBigIndex lengthAreaR_;
927 CoinBigIndex numberL_;
929 CoinBigIndex baseL_;
931 CoinBigIndex lengthL_;
933 CoinBigIndex lengthAreaL_;
937 CoinBigIndex maximumU_;
939 CoinBigIndex lengthU_;
941 CoinBigIndex lengthAreaU_;
944#ifdef ABC_USE_FUNCTION_POINTERS
946 CoinBigIndex lastEntryByColumnUPlus_;
948 CoinBigIndex lengthAreaUPlus_;
949#endif
951 CoinBigIndex lastEntryByRowU_;
954#if ABC_SMALL<4
957#endif
958#if COIN_BIG_DOUBLE==1
960 mutable CoinFactorizationLongDoubleArrayWithLength longArray_[FACTOR_CPU];
962 mutable CoinIndexedVector * associatedVector_[FACTOR_CPU];
963#endif
965 CoinIntArrayWithLength pivotColumn_;
967 CoinIntArrayWithLength permute_;
969 CoinBigIndexArrayWithLength startRowU_;
971 CoinIntArrayWithLength numberInRow_;
973 CoinIntArrayWithLength numberInColumn_;
975 CoinIntArrayWithLength numberInColumnPlus_;
978 CoinIntArrayWithLength firstCount_;
980 CoinIntArrayWithLength nextColumn_;
982 CoinIntArrayWithLength lastColumn_;
984 CoinIntArrayWithLength nextRow_;
986 CoinIntArrayWithLength lastRow_;
988 CoinIntArrayWithLength saveColumn_;
990 CoinIntArrayWithLength markRow_;
992 CoinIntArrayWithLength indexColumnU_;
994 CoinFactorizationDoubleArrayWithLength pivotRegion_;
996 CoinFactorizationDoubleArrayWithLength elementU_;
998 CoinIntArrayWithLength indexRowU_;
1000 CoinBigIndexArrayWithLength startColumnU_;
1001#ifdef ABC_USE_FUNCTION_POINTERS
1003 CoinArbitraryArrayWithLength scatterUColumn_;
1004#endif
1005#if CONVERTROW
1007 CoinBigIndexArrayWithLength convertRowToColumnU_;
1008#if CONVERTROW>1
1010 CoinBigIndexArrayWithLength convertColumnToRowU_;
1011#endif
1012#endif
1013#if ABC_SMALL<2
1015 CoinFactorizationDoubleArrayWithLength elementRowU_;
1016#endif
1018 CoinFactorizationDoubleArrayWithLength elementL_;
1020 CoinIntArrayWithLength indexRowL_;
1022 CoinBigIndexArrayWithLength startColumnL_;
1023#if ABC_SMALL<4
1025 CoinFactorizationDoubleArrayWithLength denseArea_;
1026#endif
1028 CoinFactorizationDoubleArrayWithLength workArea_;
1030 CoinUnsignedIntArrayWithLength workArea2_;
1031#if ABC_SMALL<2
1033 CoinBigIndexArrayWithLength startRowL_;
1035 CoinIntArrayWithLength indexColumnL_;
1037 CoinFactorizationDoubleArrayWithLength elementByRowL_;
1039 mutable CoinIntArrayWithLength sparse_;
1040#endif
1045 // last slack pivot row
1047#if ABC_SMALL<2
1049 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
1100 mutable double ftranFullCountInput_;
1107#if FACTORIZATION_STATISTICS
1108 double ftranFullTwiddleFactor1_;
1109 double ftranFullTwiddleFactor2_;
1110#endif
1112#endif
1115#if ABC_SMALL<2
1117 mutable double btranFullCountInput_;
1124#if FACTORIZATION_STATISTICS
1125 double btranFullTwiddleFactor1_;
1126 double btranFullTwiddleFactor2_;
1127#endif
1129#endif
1138 CoinBigIndex sizeSparseArray_;
1139public:
1140#if ABC_SMALL<2
1141#if ABC_SMALL>=0
1142 inline bool gotLCopy() const {return ((state_&ABC_FAC_GOT_LCOPY)!=0);}
1143 inline void setNoGotLCopy() {state_ &= ~ABC_FAC_GOT_LCOPY;}
1144 inline void setYesGotLCopy() {state_ |= ABC_FAC_GOT_LCOPY;}
1145 inline bool gotRCopy() const {return ((state_&ABC_FAC_GOT_RCOPY)!=0);}
1146 inline void setNoGotRCopy() {state_ &= ~ABC_FAC_GOT_RCOPY;}
1147 inline void setYesGotRCopy() {state_ |= ABC_FAC_GOT_RCOPY;}
1148 inline bool gotUCopy() const {return ((state_&ABC_FAC_GOT_UCOPY)!=0);}
1149 inline void setNoGotUCopy() {state_ &= ~ABC_FAC_GOT_UCOPY;}
1150 inline void setYesGotUCopy() {state_ |= ABC_FAC_GOT_UCOPY;}
1151 inline bool gotSparse() const {return ((state_&ABC_FAC_GOT_SPARSE)!=0);}
1152 inline void setNoGotSparse() {state_ &= ~ABC_FAC_GOT_SPARSE;}
1153 inline void setYesGotSparse() {state_ |= ABC_FAC_GOT_SPARSE;}
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
1189 //CoinSimplexInt persistenceFlag_;
1191};
1192
1193
#define COIN_RESTRICT
#define checkLinks(x)
#define FACTOR_CPU
This deals with Factorization and Updates.
#define ABC_FAC_GOT_UCOPY
#define ABC_FAC_GOT_RCOPY
#define ABC_FAC_GOT_SPARSE
#define ABC_FAC_GOT_LCOPY
double CoinSimplexDouble
unsigned int CoinSimplexUnsignedInt
#define ABC_PARALLEL
unsigned char CoinCheckZero
int CoinSimplexInt
#define ABC_SMALL
void(* scatterUpdate)(int, CoinFactorizationDouble, const CoinFactorizationDouble *, double *) SCATTER_ATTRIBUTE
Abstract base class which also has some scalars so can be used from Dense or Simp.
double zeroTolerance_
Zero tolerance.
virtual double checkReplacePart1b(CoinIndexedVector *, int)
virtual void checkReplacePart1a(CoinIndexedVector *, int)
int numberRows_
Number of Rows in factorization.
CoinBigIndex * startRowL() const
Start of each row in L.
CoinBigIndex lengthAreaU_
Length of area reserved for U.
CoinIntArrayWithLength indexColumnU_
Base address for U (may change)
void updateColumnTransposeU(CoinIndexedVector *region, CoinSimplexInt smallestIndex, CoinAbcStatistics &statistics) const
Updates part of column transpose (BTRANU), assumes index is sorted i.e.
void deleteLink(CoinSimplexInt index)
Deletes a link in chain of equal counts.
void gutsOfDestructor(CoinSimplexInt type=1)
The real work of constructors etc 0 just scalars, 1 bit normal.
void gutsOfInitialize(CoinSimplexInt type)
1 bit - tolerances etc, 2 more, 4 dummy arrays
CoinSimplexInt maximumRowsExtra() const
Maximum of Rows after iterating.
CoinBigIndex maximumU_
Maximum space used in U.
CoinIntArrayWithLength numberInColumn_
Number in each Column.
CoinFactorizationDoubleArrayWithLength elementU_
Elements of U.
CoinSimplexInt * firstCount() const
For equal counts in factorization.
bool getColumnSpace(CoinSimplexInt iColumn, CoinSimplexInt extraNeeded)
Gets space for one Column with given length, may have to do compression (returns True if successful),...
CoinSimplexInt * pivotLinkedForwards() const
void updateColumnTransposeRDensish(CoinIndexedVector *region) const
Updates part of column transpose (BTRANR) when dense.
CoinFactorizationDouble * elementUAddress_
CoinFactorizationDouble * denseAreaAddress_
virtual double checkReplacePart1(CoinIndexedVector *regionSparse, int pivotRow)
Checks if can replace one Column to basis, returns update alpha Fills in region for use later partial...
CoinIntArrayWithLength saveColumn_
Columns left to do in a single pivot.
CoinSimplexInt * nextCount() const
Next Row/Column with count.
bool getRowSpace(CoinSimplexInt iRow, CoinSimplexInt extraNeeded)
Gets space for one Row with given length, may have to do compression (returns True if successful),...
CoinSimplexInt numberRowsSmall_
Size of small inverse.
CoinBigIndex lengthAreaR_
length of area reserved for R
CoinFactorizationDoubleArrayWithLength pivotRegion_
Inverses of pivot values.
CoinBigIndex numberElementsL() const
Returns number in L area.
CoinSimplexInt numberForrestTomlin() const
Length of FT vector.
CoinSimplexInt factorSparse()
Does sparse phase of factorization return code is <0 error, 0= finished.
CoinBigIndex numberL() const
Number in L.
virtual CoinSimplexInt updateColumnFT(CoinIndexedVector &regionSparse)
Later take out return codes (apart from +- 1 on FT)
virtual void makeNonSingular(CoinSimplexInt *sequence)
Makes a non-singular basis by replacing variables.
virtual CoinFactorizationDouble * pivotRegion() const
Returns address of pivot region.
CoinFactorizationDouble * elementU() const
Elements of U.
bool reorderU()
Reorders U so contiguous and in order (if there is space) Returns true if it could.
CoinSimplexInt * pivotLOrder() const
void updateColumnLDense(CoinIndexedVector *region) const
Updates part of column (FTRANL) when dense (i.e. do as inner products)
CoinSimplexDouble adjustedAreaFactor() const
Returns areaFactor but adjusted for dense.
CoinIntArrayWithLength nextRow_
Next Row in memory order.
virtual int checkReplacePart2(int pivotRow, CoinSimplexDouble btranAlpha, double ftranAlpha, double ftAlpha, double acceptablePivot=1.0e-8)
Checks if can replace one Column to basis, returns 0=OK, 1=Probably OK, 2=singular,...
CoinBigIndex baseL() const
Base of L.
virtual void checkMarkArrays() const
void updatePartialUpdate(CoinIndexedVector &partialUpdate)
Update partial Ftran by R update.
virtual void replaceColumnPart3(const AbcSimplex *model, CoinIndexedVector *regionSparse, CoinIndexedVector *tableauColumn, CoinIndexedVector *partialUpdate, int pivotRow, double alpha)
Replaces one Column to basis, partial update in vector.
void updateColumnTransposeUDensish(CoinIndexedVector *region, CoinSimplexInt smallestIndex) const
Updates part of column transpose (BTRANU) when densish, assumes index is sorted i....
void updateColumnUSparse(CoinIndexedVector *regionSparse) const
Updates part of column (FTRANU) when sparse.
virtual CoinBigIndex numberElements() const
Total number of elements in factorization.
CoinSimplexInt numberRowsExtra_
Number of Rows after iterating.
void checkSparse()
See if worth going sparse.
bool storeFT(const CoinIndexedVector *regionFT)
Store update after doing L and R - retuns false if no room.
CoinBigIndex numberElementsR() const
Returns number in R area.
virtual void updateFullColumn(CoinIndexedVector &regionSparse) const
Updates one full column (FTRAN)
CoinSimplexInt numberR_
Number in R.
CoinBigIndex * startColumnL() const
Start of each column in L.
CoinFactorizationDoubleArrayWithLength elementByRowL_
Elements in L (row copy)
CoinBigIndex numberL_
Number in L.
CoinUnsignedIntArrayWithLength workArea2_
Second work area.
virtual CoinSimplexInt * pivotColumn() const
Returns address of pivotColumn region (also used for permuting)
CoinBigIndex * startColumnR() const
Start of columns for R.
void updateColumnPFI(CoinIndexedVector *regionSparse) const
Updates part of column PFI (FTRAN) (after rest)
void updateColumnL(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column (FTRANL)
CoinSimplexInt * lastCount() const
Previous Row/Column with count.
void doAddresses()
Set up addresses from arrays.
double ftranCountInput_
To decide how to solve.
void separateLinks(CoinSimplexInt, CoinSimplexInt)
CoinBigIndexArrayWithLength startRowL_
Start of each row in L.
friend void CoinAbcFactorizationUnitTest(const std::string &mpsDir)
CoinBigIndexArrayWithLength startColumnL_
Start of each column in L.
virtual CoinSimplexInt * numberInColumn() const
Number of entries in each column.
CoinBigIndex lastEntryByRowU_
Last entry by row for U.
const double * denseVector(const CoinIndexedVector &vector) const
void sort() const
Debug - sort so can compare.
virtual bool wantsTableauColumn() const
Returns true if wants tableauColumn in replaceColumn.
CoinBigIndex lengthU_
Length of U.
CoinFactorizationDouble * workAreaAddress_
CoinBigIndex lastEntryByColumnU_
Last entry by column for U.
CoinAbcTypeFactorization()
Default constructor.
CoinSimplexInt * pivotLinkedBackwards() const
Forward and backward linked lists (numberRows_+2)
CoinSimplexInt sparseThreshold() const
get sparse threshold
void scan(CoinIndexedVector *vector) const
Scans region to find nonzeros.
void updateColumnLDensish(CoinIndexedVector *region) const
Updates part of column (FTRANL) when densish.
CoinFactorizationDoubleArrayWithLength elementRowU_
Elements of U by row.
CoinSimplexInt state_
State of saved version and what can be done 0 - nothing saved 1 - saved and can go back to previous s...
CoinSimplexDouble maximumCoefficient() const
Returns maximum absolute value in factorization.
virtual void preProcess()
PreProcesses column ordered copy of basis.
CoinBigIndex sizeSparseArray_
Size in bytes of a sparseArray.
void pack(CoinIndexedVector *regionFrom, CoinIndexedVector *regionTo) const
CoinIntArrayWithLength numberInRow_
Number in each Row.
double * denseVector(CoinIndexedVector *vector) const
Returns double * associated with vector.
CoinIntArrayWithLength pivotColumn_
Pivot order for each Column.
CoinSimplexInt maximumRowsExtra_
Maximum number of Rows after iterating.
CoinBigIndex lengthAreaU() const
Returns length of U area.
CoinSimplexInt messageLevel_
Detail in messages.
CoinBigIndex getColumnSpaceIterate(CoinSimplexInt iColumn, CoinFactorizationDouble value, CoinSimplexInt iRow)
getColumnSpaceIterate.
bool pivotRowSingleton(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
Does one pivot on Row Singleton in factorization.
CoinBigIndex lengthAreaL_
Length of area reserved for L.
virtual CoinSimplexInt * indices() const
Returns array to put basis indices in.
void cleanup()
Cleans up at end of factorization.
CoinSimplexInt numberU_
Number in U.
virtual int updateColumnFTPart1(CoinIndexedVector &regionSparse)
void updateTwoColumnsUDensish(CoinSimplexInt &numberNonZero1, CoinFactorizationDouble *COIN_RESTRICT region1, CoinSimplexInt *COIN_RESTRICT index1, CoinSimplexInt &numberNonZero2, CoinFactorizationDouble *COIN_RESTRICT region2, CoinSimplexInt *COIN_RESTRICT index2) const
Updates part of 2 columns (FTRANU) real work.
CoinSimplexInt sparseThreshold_
Below this use sparse technology - if 0 then no L row copy.
CoinBigIndex * startColumnU() const
Start of each column in U.
CoinSimplexInt * indexRowU() const
Row indices of U.
CoinBigIndex lengthAreaL() const
Returns length of L area.
void separateLinks()
Separate out links with same row/column count.
CoinBigIndex firstZeroed_
First place in funny copy zeroed out.
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.
CoinSimplexInt * lastCountAddress_
Previous Row/Column with count.
CoinIntArrayWithLength lastRow_
Previous Row in memory order.
CoinSimplexInt numberRowsExtra() const
Number of Rows after iterating.
int replaceColumnU(CoinIndexedVector *regionSparse, CoinBigIndex *deletedPosition, CoinSimplexInt *deletedColumns, CoinSimplexInt pivotRow)
Combines BtranU and store which elements are to be deleted returns number to be deleted.
void updateColumnR(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column (FTRANR) without FT update.
CoinSimplexInt factorDense()
Does dense phase of factorization return code is <0 error, 0= finished.
CoinSimplexInt * indexRowL() const
Row indices of L.
virtual void updateColumnFT(CoinIndexedVector &regionSparseFT, CoinIndexedVector &partialUpdate, int which)
Updates one column (FTRAN) Tries to do FT update puts partial update in vector.
virtual void maximumPivots(CoinSimplexInt value)
Set maximum pivots.
CoinSimplexInt * nextCountAddress_
Next Row/Column with count.
CoinBigIndex lengthL_
Length of L.
CoinSimplexInt numberTrials_
Number of trials before rejection.
CoinSimplexInt numberRowsLeft_
Number Rows left (numberRows-numberGood)
const double * denseVector(const CoinIndexedVector *vector) const
Returns double * associated with vector.
void updateColumnLSparse(CoinIndexedVector *region) const
Updates part of column (FTRANL) when sparse.
virtual void getAreas(CoinSimplexInt numberRows, CoinSimplexInt numberColumns, CoinBigIndex maximumL, CoinBigIndex maximumU)
Gets space for a factorization, called by constructors.
virtual void updateColumnFTPart2(CoinIndexedVector &regionSparse)
int wantToGoDense()
After pivoting - returns true if need to go dense.
CoinSimplexInt checkPivot(CoinSimplexDouble saveFromU, CoinSimplexDouble oldPivot) const
Returns accuracy status of replaceColumn returns 0=OK, 1=Probably OK, 2=singular.
CoinBigIndex totalElements_
Number of elements in U (to go) or while iterating total overall.
CoinFactorizationDouble * elementByRowLAddress_
CoinFactorizationDouble * elementByRowL() const
Elements in L (row copy)
virtual void updateWeights(CoinIndexedVector &regionSparse) const
Updates one column for dual steepest edge weights (FTRAN)
CoinBigIndexArrayWithLength startColumnU_
Start of each column in U.
void almostDestructor()
Delete all stuff (leaves as after CoinAbcFactorization())
CoinIntArrayWithLength lastColumn_
Previous Column in memory order.
void updateColumnTransposeRSparse(CoinIndexedVector *region) const
Updates part of column transpose (BTRANR) when sparse.
void modifyLink(CoinSimplexInt index, CoinSimplexInt count)
Modifies links in chain of equal counts.
virtual void updateColumnCpu(CoinIndexedVector &regionSparse, int whichCpu) const
Updates one column (FTRAN)
virtual ~CoinAbcTypeFactorization()
Destructor.
void updateColumnTransposeLByRow(CoinIndexedVector *region) const
Updates part of column transpose (BTRANL) when densish by row.
void afterPivot(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
After pivoting.
CoinSimplexInt leadingDimension_
Leading dimension for dense.
CoinIntArrayWithLength indexRowL_
Row indices of L.
CoinBigIndexArrayWithLength startRowU_
Start of each Row as pointer.
CoinIntArrayWithLength numberInColumnPlus_
Number in each Column including pivoted.
virtual CoinSimplexInt updateColumnTranspose(CoinIndexedVector &regionSparse) const
Updates one column (BTRAN) from regionSparse2 regionSparse starts as zero and is zero at end Note - i...
void setNumberElementsU(CoinBigIndex value)
Setss number in U area.
void messageLevel(CoinSimplexInt value)
void preProcess(CoinSimplexInt)
bool spaceForForrestTomlin() const
True if FT update and space.
void sparseThreshold(CoinSimplexInt value)
set sparse threshold
void fromLongArray(int which) const
From a work array and dis-associate vector.
void updateColumnTransposeUSparse(CoinIndexedVector *region) const
Updates part of column transpose (BTRANU) when sparse, assumes index is sorted i.e.
int pivot(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn, CoinBigIndex pivotRowPosition, CoinBigIndex pivotColumnPosition, CoinFactorizationDouble *COIN_RESTRICT work, CoinSimplexUnsignedInt *COIN_RESTRICT workArea2, CoinSimplexInt increment2, int *COIN_RESTRICT markRow)
0 fine, -99 singular, 2 dense
void updateColumnTransposeL(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column transpose (BTRANL)
bool pivotOneOtherRow(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
Pivots when just one other row so faster?
void updateColumnTransposeLSparse(CoinIndexedVector *region) const
Updates part of column transpose (BTRANL) when sparse (by Row)
CoinSimplexInt maximumRows_
Maximum rows (ever) (here to use double alignment)
virtual void postProcess(const CoinSimplexInt *sequence, CoinSimplexInt *pivotVariable)
Does post processing on valid factorization - putting variables on correct rows.
void updateColumnU(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column (FTRANU)
CoinSimplexInt * indexColumnL() const
Index of column in row for L.
int pivot(CoinSimplexInt &pivotRow, CoinSimplexInt &pivotColumn, CoinBigIndex pivotRowPosition, CoinBigIndex pivotColumnPosition, int *COIN_RESTRICT markRow)
CoinFactorizationDoubleArrayWithLength denseArea_
Dense area.
CoinSimplexInt * permute() const
Returns address of permute region.
CoinBigIndex lengthR_
Length of R stuff.
CoinAbcTypeFactorization(const CoinAbcTypeFactorization &other)
Copy constructor.
CoinBigIndex numberCompressions_
Number of compressions done.
void unpack(CoinIndexedVector *regionFrom, CoinIndexedVector *regionTo) const
CoinIntArrayWithLength permute_
Permutation vector for pivot row order.
double * denseVector(CoinIndexedVector &vector) const
CoinSimplexInt initialNumberRows_
Rows first time nonzero.
CoinSimplexDouble conditionNumber() const
Condition number - product of pivots after factorization.
void updateColumnUDensish(CoinIndexedVector *regionSparse) const
Updates part of column (FTRANU)
void fromLongArray(CoinIndexedVector *vector) const
From a work array and dis-associate vector.
CoinFactorizationDouble * elementRowUAddress_
CoinSimplexInt replaceColumnPFI(CoinIndexedVector *regionSparse, CoinSimplexInt pivotRow, CoinSimplexDouble alpha)
Replaces one Column to basis for PFI returns 0=OK, 1=Probably OK, 2=singular, 3=no room.
CoinIntArrayWithLength indexColumnL_
Index of column in row for L.
bool getRowSpaceIterate(CoinSimplexInt iRow, CoinSimplexInt extraNeeded)
Gets space for one Row with given length while iterating, may have to do compression (returns True if...
void resetStatistics()
Reset all sparsity etc statistics.
virtual double checkReplacePart1(CoinIndexedVector *regionSparse, CoinIndexedVector *partialUpdate, int pivotRow)
Checks if can replace one Column to basis, returns update alpha Fills in region for use later partial...
double preProcess3()
Return largest element.
void updateColumnTransposePFI(CoinIndexedVector *region) const
Updates part of column transpose PFI (BTRAN) (before rest)
void updateColumnTransposeR(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column transpose (BTRANR)
void goSparse()
makes a row copy of L for speed and to allow very sparse problems
CoinIntArrayWithLength nextColumn_
Next Column in memory order.
virtual CoinSimplexInt factor(AbcSimplex *model)
Does most of factorization.
CoinIntArrayWithLength firstCount_
First Row/Column with count of k, can tell which by offset - Rows then Columns.
virtual CoinFactorizationDouble * elements() const
Returns array to put basis elements in.
CoinSimplexUnsignedInt * workArea2Address_
CoinFactorizationDoubleArrayWithLength workArea_
First work area.
CoinSimplexInt maximumMaximumPivots_
Maximum maximum pivots.
virtual void updateFullColumnTranspose(CoinIndexedVector &regionSparse) const
Updates one full column (BTRAN)
CoinBigIndex numberCompressions() const
Number of compressions done.
void printRegion(const CoinIndexedVector &vector, const char *where) const
void toLongArray(CoinIndexedVector *vector, int which) const
To a work array and associate vector.
CoinIntArrayWithLength markRow_
Marks rows to be updated.
virtual CoinAbcAnyFactorization * clone() const
Clone.
void clearArrays()
Get rid of all memory.
CoinSimplexInt * indexRowRAddress_
Row indices for R.
void updateColumnUDense(CoinIndexedVector *regionSparse) const
Updates part of column (FTRANU) when dense (i.e. do as inner products)
double btranFullCountInput_
To decide how to solve.
double ftranFullCountInput_
To decide how to solve.
void addLink(CoinSimplexInt index, CoinSimplexInt count)
Adds a link in chain of equal counts.
CoinSimplexInt messageLevel() const
Level of detail of messages.
void updateColumnTransposeLDensish(CoinIndexedVector *region) const
Updates part of column transpose (BTRANL) when densish by column.
void setDenseThreshold(CoinSimplexInt value)
Sets dense threshold.
CoinSimplexInt numberGoodL_
Number factorized in L.
CoinSimplexInt denseThreshold() const
Gets dense threshold.
CoinSimplexInt denseThreshold_
Dense threshold (here to use double alignment)
void checkConsistency()
Checks that row and column copies look OK.
CoinFactorizationDouble * pivotRegionAddress_
CoinIntArrayWithLength sparse_
Sparse regions.
CoinIntArrayWithLength indexRowU_
Row indices of U.
virtual void updateColumnTransposeCpu(CoinIndexedVector &regionSparse, int whichCpu) const
Updates one column (BTRAN)
virtual CoinSimplexInt * numberInRow() const
Number of entries in each row.
CoinFactorizationDouble * elementRAddress_
Elements of R.
virtual void replaceColumnPart3(const AbcSimplex *model, CoinIndexedVector *regionSparse, CoinIndexedVector *tableauColumn, int pivotRow, double alpha)
Replaces one Column to basis, partial update already in U.
CoinBigIndex numberElementsU() const
Returns number in U area.
void updateColumnTransposeUByColumn(CoinIndexedVector *region, CoinSimplexInt smallestIndex) const
Updates part of column transpose (BTRANU) by column assumes index is sorted i.e.
bool getColumnSpaceIterateR(CoinSimplexInt iColumn, CoinFactorizationDouble value, CoinSimplexInt iRow)
getColumnSpaceIterateR.
CoinAbcTypeFactorization(const CoinFactorization &other)
Copy constructor.
CoinFactorizationDoubleArrayWithLength elementL_
Elements of L.
CoinFactorizationDouble * elementLAddress_
virtual CoinSimplexInt updateColumn(CoinIndexedVector &regionSparse) const
This version has same effect as above with FTUpdate==false so number returned is always >=0.
void gutsOfCopy(const CoinAbcTypeFactorization &other)
void show_self() const
Debug show object (shows one representation)
void pivotColumnSingleton(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
Does one pivot on Column Singleton in factorization (can't return false)
virtual CoinBigIndex * starts() const
Returns pivot row.