Cgl 0.60.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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"
19 #include "CoinAbcHelperFunctions.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 CoinAbcAnyFactorization {
29 friend void CoinAbcFactorizationUnitTest(const std::string &mpsDir);
30
31 public:
34 CoinAbcTypeFactorization();
37 CoinAbcTypeFactorization(const CoinAbcTypeFactorization &other);
39 CoinAbcTypeFactorization(const CoinFactorization &other);
40
42 virtual ~CoinAbcTypeFactorization();
44 virtual CoinAbcAnyFactorization *clone() const;
46 void almostDestructor();
48 void show_self() const;
50 void sort() const;
52 CoinAbcTypeFactorization &operator=(const CoinAbcTypeFactorization &other);
54
57 CoinSimplexDouble conditionNumber() const;
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
122 inline CoinSimplexInt *pivotLinkedBackwards() const
123 {
124 return firstCount_.array() + numberRows_ + 1;
125 }
126 inline CoinSimplexInt *pivotLinkedForwards() const
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
139 typedef void (*scatterUpdate)(int, CoinFactorizationDouble, const CoinFactorizationDouble *, CoinFactorizationDouble *);
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
181 inline CoinSimplexInt numberRowsExtra() const
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 }
197 inline CoinSimplexInt maximumRowsExtra() const
198 {
199 return maximumRowsExtra_;
200 }
202 virtual inline CoinBigIndex numberElements() const
203 {
204 return totalElements_;
205 }
207 inline CoinSimplexInt numberForrestTomlin() const
208 {
209 return numberInColumn_.array()[numberRowsExtra_];
210 }
212 CoinSimplexDouble adjustedAreaFactor() const;
214 inline CoinSimplexInt messageLevel() const
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 }
229 inline void setDenseThreshold(CoinSimplexInt value)
230 {
231 denseThreshold_ = value;
232 }
233 #endif
234 CoinSimplexDouble maximumCoefficient() const;
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 {
246 CoinBigIndex start = lastEntryByColumnU_;
247 CoinBigIndex space = lengthAreaU_ - (start + numberRowsExtra_);
248 return (space >= 0); //&&doForrestTomlin_;
249 }
251
254
256 inline CoinBigIndex numberElementsU() const
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 }
271 inline CoinBigIndex numberElementsL() const
272 {
273 return lengthL_;
274 }
276 inline CoinBigIndex lengthAreaL() const
277 {
278 return lengthAreaL_;
279 }
281 inline CoinBigIndex numberElementsR() const
282 {
283 return lengthR_;
284 }
286 inline CoinBigIndex numberCompressions() const
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 }
322 inline CoinFactorizationDouble *elementU() const
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,
420 CoinSimplexInt pivotRow,
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
460 checkReplacePart1b(CoinIndexedVector *regionSparse,
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,
513 CoinSimplexInt pivotRow);
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;
543 virtual CoinSimplexInt updateTwoColumnsFT(CoinIndexedVector &regionFT,
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
572 inline CoinSimplexInt sparseThreshold() const
573 {
574 return sparseThreshold_;
575 }
576 #endif
577
578 void sparseThreshold(CoinSimplexInt value);
580
585 inline void clearArrays()
587 {
588 gutsOfDestructor();
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();
615 void preProcess(CoinSimplexInt);
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:
633 CoinSimplexInt factorSparse();
636 CoinSimplexInt factorDense();
637
639 bool pivotOneOtherRow(CoinSimplexInt pivotRow,
640 CoinSimplexInt pivotColumn);
642 bool pivotRowSingleton(CoinSimplexInt pivotRow,
643 CoinSimplexInt pivotColumn);
645 void pivotColumnSingleton(CoinSimplexInt pivotRow,
646 CoinSimplexInt pivotColumn);
648 void afterPivot(CoinSimplexInt pivotRow,
649 CoinSimplexInt pivotColumn);
651 int wantToGoDense();
652
657 bool getColumnSpace(CoinSimplexInt iColumn,
658 CoinSimplexInt extraNeeded);
659
662 bool reorderU();
666 bool getColumnSpaceIterateR(CoinSimplexInt iColumn, CoinFactorizationDouble value,
667 CoinSimplexInt iRow);
673 CoinBigIndex getColumnSpaceIterate(CoinSimplexInt iColumn, CoinFactorizationDouble value,
674 CoinSimplexInt iRow);
678 bool getRowSpace(CoinSimplexInt iRow, CoinSimplexInt extraNeeded);
679
683 bool getRowSpaceIterate(CoinSimplexInt iRow,
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 {
696 CoinSimplexInt *COIN_RESTRICT nextCount = nextCountAddress_;
697 CoinSimplexInt *COIN_RESTRICT firstCount = this->firstCount();
698 CoinSimplexInt *COIN_RESTRICT lastCount = lastCountAddress_;
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 {
709 CoinSimplexInt *COIN_RESTRICT nextCount = nextCountAddress_;
710 CoinSimplexInt *COIN_RESTRICT lastCount = lastCountAddress_;
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;
721 CoinSimplexInt *COIN_RESTRICT firstCount = this->firstCount();
722 firstCount[count] = next;
723 }
724 }
726 inline void modifyLink(CoinSimplexInt index, CoinSimplexInt count)
727 {
728 CoinSimplexInt *COIN_RESTRICT nextCount = nextCountAddress_;
729 CoinSimplexInt *COIN_RESTRICT lastCount = lastCountAddress_;
730 CoinSimplexInt *COIN_RESTRICT firstCount = this->firstCount();
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();
754 void separateLinks(CoinSimplexInt, CoinSimplexInt);
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;
776 void updateColumnLSparse(CoinIndexedVector *region
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;
824 void updateTwoColumnsUDensish(
825 CoinSimplexInt &numberNonZero1,
826 CoinFactorizationDouble *COIN_RESTRICT region1,
827 CoinSimplexInt *COIN_RESTRICT index1,
828 CoinSimplexInt &numberNonZero2,
829 CoinFactorizationDouble *COIN_RESTRICT region2,
830 CoinSimplexInt *COIN_RESTRICT index2) const;
832 void updateColumnPFI(CoinIndexedVector *regionSparse) const;
834 void updateColumnTransposePFI(CoinIndexedVector *region) const;
837 void updateColumnTransposeU(CoinIndexedVector *region,
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;
850 void updateColumnTransposeUDensish(CoinIndexedVector *region,
851 CoinSimplexInt smallestIndex) const;
854 void updateColumnTransposeUSparse(CoinIndexedVector *region
855 #if ABC_PARALLEL
856 ,
857 int whichSparse
858 #endif
859 ) const;
862 void updateColumnTransposeUByColumn(CoinIndexedVector *region,
863 CoinSimplexInt smallestIndex) const;
864
866 void updateColumnTransposeR(CoinIndexedVector *region
867 #if ABC_SMALL < 2
868 ,
869 CoinAbcStatistics &statistics
870 #endif
871 ) const;
873 void updateColumnTransposeRDensish(CoinIndexedVector *region) const;
875 void updateColumnTransposeRSparse(CoinIndexedVector *region) const;
876
878 void updateColumnTransposeL(CoinIndexedVector *region
879 #if ABC_SMALL < 2
880 ,
881 CoinAbcStatistics &statistics
882 #endif
883 #if ABC_PARALLEL
884 ,
885 int whichSparse
886 #endif
887 ) const;
889 void updateColumnTransposeLDensish(CoinIndexedVector *region) const;
891 void updateColumnTransposeLByRow(CoinIndexedVector *region) const;
893 void updateColumnTransposeLSparse(CoinIndexedVector *region
894 #if ABC_PARALLEL
895 ,
896 int whichSparse
897 #endif
898 ) const;
899 public:
904 CoinSimplexInt replaceColumnPFI(CoinIndexedVector *regionSparse,
905 CoinSimplexInt pivotRow, CoinSimplexDouble alpha);
906
907 protected:
910 CoinSimplexInt checkPivot(CoinSimplexDouble saveFromU, CoinSimplexDouble oldPivot) const;
912 int pivot(CoinSimplexInt pivotRow,
913 CoinSimplexInt pivotColumn,
914 CoinBigIndex pivotRowPosition,
915 CoinBigIndex pivotColumnPosition,
916 CoinFactorizationDouble *COIN_RESTRICT work,
917 CoinSimplexUnsignedInt *COIN_RESTRICT workArea2,
918 CoinSimplexInt increment2,
919 int *COIN_RESTRICT markRow);
920 int pivot(CoinSimplexInt &pivotRow,
921 CoinSimplexInt &pivotColumn,
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:
938 CoinSimplexInt *pivotColumnAddress_;
939 CoinSimplexInt *permuteAddress_;
940 CoinFactorizationDouble *pivotRegionAddress_;
941 CoinFactorizationDouble *elementUAddress_;
942 CoinSimplexInt *indexRowUAddress_;
943 CoinSimplexInt *numberInColumnAddress_;
944 CoinSimplexInt *numberInColumnPlusAddress_;
945 #ifdef ABC_USE_FUNCTION_POINTERS
946 scatterStruct *scatterPointersUColumnAddress_;
948 CoinFactorizationDouble *elementUColumnPlusAddress_;
949 #endif
950 CoinBigIndex *startColumnUAddress_;
951 #if CONVERTROW
952 CoinBigIndex *convertRowToColumnUAddress_;
953 #if CONVERTROW > 1
954 CoinBigIndex *convertColumnToRowUAddress_;
955 #endif
956 #endif
957 #if ABC_SMALL < 2
958 CoinFactorizationDouble *elementRowUAddress_;
959 #endif
960 CoinBigIndex *startRowUAddress_;
961 CoinSimplexInt *numberInRowAddress_;
962 CoinSimplexInt *indexColumnUAddress_;
963 CoinSimplexInt *firstCountAddress_;
965 CoinSimplexInt *nextCountAddress_;
967 CoinSimplexInt *lastCountAddress_;
968 CoinSimplexInt *nextColumnAddress_;
969 CoinSimplexInt *lastColumnAddress_;
970 CoinSimplexInt *nextRowAddress_;
971 CoinSimplexInt *lastRowAddress_;
972 CoinSimplexInt *saveColumnAddress_;
973 //CoinSimplexInt * saveColumnAddress2_;
974 CoinCheckZero *markRowAddress_;
975 CoinSimplexInt *listAddress_;
976 CoinFactorizationDouble *elementLAddress_;
977 CoinSimplexInt *indexRowLAddress_;
978 CoinBigIndex *startColumnLAddress_;
979 #if ABC_SMALL < 2
980 CoinBigIndex *startRowLAddress_;
981 #endif
982 CoinSimplexInt *pivotLinkedBackwardsAddress_;
983 CoinSimplexInt *pivotLinkedForwardsAddress_;
984 CoinSimplexInt *pivotLOrderAddress_;
985 CoinBigIndex *startColumnRAddress_;
987 CoinFactorizationDouble *elementRAddress_;
989 CoinSimplexInt *indexRowRAddress_;
990 CoinSimplexInt *indexColumnLAddress_;
991 CoinFactorizationDouble *elementByRowLAddress_;
992 #if ABC_SMALL < 4
993 CoinFactorizationDouble *denseAreaAddress_;
994 #endif
995 CoinFactorizationDouble *workAreaAddress_;
996 CoinSimplexUnsignedInt *workArea2Address_;
997 mutable CoinSimplexInt *sparseAddress_;
998 #ifdef SMALL_PERMUTE
999 CoinSimplexInt *fromSmallToBigRow_;
1000 CoinSimplexInt *fromSmallToBigColumn_;
1001 #endif
1002 CoinSimplexInt numberRowsExtra_;
1005 CoinSimplexInt maximumRowsExtra_;
1007 CoinSimplexInt numberRowsSmall_;
1009 CoinSimplexInt numberGoodL_;
1011 CoinSimplexInt numberRowsLeft_;
1014 CoinBigIndex totalElements_;
1016 CoinBigIndex firstZeroed_;
1017 #if ABC_SMALL < 2
1018 CoinSimplexInt sparseThreshold_;
1020 #endif
1021 CoinSimplexInt numberR_;
1024 CoinBigIndex lengthR_;
1026 CoinBigIndex lengthAreaR_;
1028 CoinBigIndex numberL_;
1030 CoinBigIndex baseL_;
1032 CoinBigIndex lengthL_;
1034 CoinBigIndex lengthAreaL_;
1036 CoinSimplexInt numberU_;
1038 CoinBigIndex maximumU_;
1040 CoinBigIndex lengthU_;
1042 CoinBigIndex lengthAreaU_;
1044 CoinBigIndex lastEntryByColumnU_;
1045 #ifdef ABC_USE_FUNCTION_POINTERS
1046 CoinBigIndex lastEntryByColumnUPlus_;
1049 CoinBigIndex lengthAreaUPlus_;
1050 #endif
1051 CoinBigIndex lastEntryByRowU_;
1054 CoinSimplexInt numberTrials_;
1055 #if ABC_SMALL < 4
1056 CoinSimplexInt leadingDimension_;
1058 #endif
1059 #if COIN_BIG_DOUBLE == 1
1060 mutable CoinFactorizationLongDoubleArrayWithLength longArray_[FACTOR_CPU];
1063 mutable CoinIndexedVector *associatedVector_[FACTOR_CPU];
1064 #endif
1065 CoinIntArrayWithLength pivotColumn_;
1068 CoinIntArrayWithLength permute_;
1070 CoinBigIndexArrayWithLength startRowU_;
1072 CoinIntArrayWithLength numberInRow_;
1074 CoinIntArrayWithLength numberInColumn_;
1076 CoinIntArrayWithLength numberInColumnPlus_;
1079 CoinIntArrayWithLength firstCount_;
1081 CoinIntArrayWithLength nextColumn_;
1083 CoinIntArrayWithLength lastColumn_;
1085 CoinIntArrayWithLength nextRow_;
1087 CoinIntArrayWithLength lastRow_;
1089 CoinIntArrayWithLength saveColumn_;
1091 CoinIntArrayWithLength markRow_;
1093 CoinIntArrayWithLength indexColumnU_;
1095 CoinFactorizationDoubleArrayWithLength pivotRegion_;
1097 CoinFactorizationDoubleArrayWithLength elementU_;
1099 CoinIntArrayWithLength indexRowU_;
1101 CoinBigIndexArrayWithLength startColumnU_;
1102 #ifdef ABC_USE_FUNCTION_POINTERS
1103 CoinArbitraryArrayWithLength scatterUColumn_;
1105 #endif
1106 #if CONVERTROW
1107 CoinBigIndexArrayWithLength convertRowToColumnU_;
1109 #if CONVERTROW > 1
1110 CoinBigIndexArrayWithLength convertColumnToRowU_;
1112 #endif
1113 #endif
1114 #if ABC_SMALL < 2
1115 CoinFactorizationDoubleArrayWithLength elementRowU_;
1117 #endif
1118 CoinFactorizationDoubleArrayWithLength elementL_;
1121 CoinIntArrayWithLength indexRowL_;
1123 CoinBigIndexArrayWithLength startColumnL_;
1124 #if ABC_SMALL < 4
1125 CoinFactorizationDoubleArrayWithLength denseArea_;
1127 #endif
1128 CoinFactorizationDoubleArrayWithLength workArea_;
1131 CoinUnsignedIntArrayWithLength workArea2_;
1132 #if ABC_SMALL < 2
1133 CoinBigIndexArrayWithLength startRowL_;
1136 CoinIntArrayWithLength indexColumnL_;
1138 CoinFactorizationDoubleArrayWithLength elementByRowL_;
1140 mutable CoinIntArrayWithLength sparse_;
1141 #endif
1142 CoinSimplexInt messageLevel_;
1145 CoinBigIndex numberCompressions_;
1146 // last slack pivot row
1147 CoinSimplexInt lastSlack_;
1148 #if ABC_SMALL < 2
1149 mutable double ftranCountInput_;
1151 mutable double ftranCountAfterL_;
1152 mutable double ftranCountAfterR_;
1153 mutable double ftranCountAfterU_;
1154 double ftranAverageAfterL_;
1155 double ftranAverageAfterR_;
1156 double ftranAverageAfterU_;
1157 #if FACTORIZATION_STATISTICS
1158 double ftranTwiddleFactor1_;
1159 double ftranTwiddleFactor2_;
1160 #endif
1161 mutable CoinSimplexInt numberFtranCounts_;
1162 #endif
1163 CoinSimplexInt maximumRows_;
1165 #if ABC_SMALL < 2
1166 mutable double ftranFTCountInput_;
1167 mutable double ftranFTCountAfterL_;
1168 mutable double ftranFTCountAfterR_;
1169 mutable double ftranFTCountAfterU_;
1170 double ftranFTAverageAfterL_;
1171 double ftranFTAverageAfterR_;
1172 double ftranFTAverageAfterU_;
1173 #if FACTORIZATION_STATISTICS
1174 double ftranFTTwiddleFactor1_;
1175 double ftranFTTwiddleFactor2_;
1176 #endif
1177 mutable CoinSimplexInt numberFtranFTCounts_;
1178 #endif
1179 #if ABC_SMALL < 4
1180 CoinSimplexInt denseThreshold_;
1182 #endif
1183 #if ABC_SMALL < 2
1184 mutable double btranCountInput_;
1185 mutable double btranCountAfterU_;
1186 mutable double btranCountAfterR_;
1187 mutable double btranCountAfterL_;
1188 double btranAverageAfterU_;
1189 double btranAverageAfterR_;
1190 double btranAverageAfterL_;
1191 #if FACTORIZATION_STATISTICS
1192 double btranTwiddleFactor1_;
1193 double btranTwiddleFactor2_;
1194 #endif
1195 mutable CoinSimplexInt numberBtranCounts_;
1196 #endif
1197 CoinSimplexInt maximumMaximumPivots_;
1199 #if ABC_SMALL < 2
1200 mutable double ftranFullCountInput_;
1202 mutable double ftranFullCountAfterL_;
1203 mutable double ftranFullCountAfterR_;
1204 mutable double ftranFullCountAfterU_;
1205 double ftranFullAverageAfterL_;
1206 double ftranFullAverageAfterR_;
1207 double ftranFullAverageAfterU_;
1208 #if FACTORIZATION_STATISTICS
1209 double ftranFullTwiddleFactor1_;
1210 double ftranFullTwiddleFactor2_;
1211 #endif
1212 mutable CoinSimplexInt numberFtranFullCounts_;
1213 #endif
1214 CoinSimplexInt initialNumberRows_;
1216 #if ABC_SMALL < 2
1217 mutable double btranFullCountInput_;
1219 mutable double btranFullCountAfterL_;
1220 mutable double btranFullCountAfterR_;
1221 mutable double btranFullCountAfterU_;
1222 double btranFullAverageAfterL_;
1223 double btranFullAverageAfterR_;
1224 double btranFullAverageAfterU_;
1225 #if FACTORIZATION_STATISTICS
1226 double btranFullTwiddleFactor1_;
1227 double btranFullTwiddleFactor2_;
1228 #endif
1229 mutable CoinSimplexInt numberBtranFullCounts_;
1230 #endif
1231
1237 CoinSimplexInt state_;
1239 CoinBigIndex sizeSparseArray_;
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; }
1249 inline void setYesGotLCopy() { 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; }
1252 inline void setYesGotRCopy() { 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; }
1255 inline void setYesGotUCopy() { state_ |= ABC_FAC_GOT_UCOPY; }
1256 inline bool gotSparse() const { return ((state_ & ABC_FAC_GOT_SPARSE) != 0); }
1257 inline void setNoGotSparse() { state_ &= ~ABC_FAC_GOT_SPARSE; }
1258 inline void setYesGotSparse() { state_ |= ABC_FAC_GOT_SPARSE; }
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 */
CoinAbcTypeFactorization::numberL_
CoinBigIndex numberL_
Number in L.
Definition: CoinAbcBaseFactorization.hpp:1028
CoinBigIndexArrayWithLength::array
CoinBigIndex * array() const
Get Array.
Definition: CoinIndexedVector.hpp:997
CoinUnsignedIntArrayWithLength
unsigned int * version
Definition: CoinIndexedVector.hpp:1063
CoinAbcTypeFactorization::btranAverageAfterL_
double btranAverageAfterL_
Definition: CoinAbcBaseFactorization.hpp:1190
CoinAbcTypeFactorization::ftranFTCountAfterU_
double ftranFTCountAfterU_
Definition: CoinAbcBaseFactorization.hpp:1169
CoinAbcTypeFactorization::updateColumnTransposeRDensish
void updateColumnTransposeRDensish(CoinIndexedVector *region) const
Updates part of column transpose (BTRANR) when dense.
CoinAbcTypeFactorization::lastRow_
CoinIntArrayWithLength lastRow_
Previous Row in memory order.
Definition: CoinAbcBaseFactorization.hpp:1087
CoinAbcTypeFactorization::startRowL_
CoinBigIndexArrayWithLength startRowL_
Start of each row in L.
Definition: CoinAbcBaseFactorization.hpp:1134
CoinAbcTypeFactorization::ftranAverageAfterL_
double ftranAverageAfterL_
Definition: CoinAbcBaseFactorization.hpp:1154
CoinAbcTypeFactorization::gutsOfInitialize
void gutsOfInitialize(CoinSimplexInt type)
1 bit - tolerances etc, 2 more, 4 dummy arrays
CoinAbcTypeFactorization::setYesGotRCopy
void setYesGotRCopy()
Definition: CoinAbcBaseFactorization.hpp:1252
CoinAbcTypeFactorization::updateColumnTransposeUSparse
void updateColumnTransposeUSparse(CoinIndexedVector *region) const
Updates part of column transpose (BTRANU) when sparse, assumes index is sorted i.e.
CoinAbcTypeFactorization::ftranFTCountAfterR_
double ftranFTCountAfterR_
Definition: CoinAbcBaseFactorization.hpp:1168
CoinAbcAnyFactorization::numberRows_
int numberRows_
Number of Rows in factorization.
Definition: CoinAbcDenseFactorization.hpp:401
CoinAbcTypeFactorization::startColumnR
CoinBigIndex * startColumnR() const
Start of columns for R.
Definition: CoinAbcBaseFactorization.hpp:317
CoinAbcTypeFactorization::indexRowL_
CoinIntArrayWithLength indexRowL_
Row indices of L.
Definition: CoinAbcBaseFactorization.hpp:1121
CoinAbcTypeFactorization::startColumnLAddress_
CoinBigIndex * startColumnLAddress_
Definition: CoinAbcBaseFactorization.hpp:978
CoinAbcTypeFactorization::maximumMaximumPivots_
CoinSimplexInt maximumMaximumPivots_
Maximum maximum pivots.
Definition: CoinAbcBaseFactorization.hpp:1198
CoinAbcTypeFactorization::btranFullCountAfterU_
double btranFullCountAfterU_
Definition: CoinAbcBaseFactorization.hpp:1221
CoinAbcTypeFactorization::nextColumnAddress_
CoinSimplexInt * nextColumnAddress_
Definition: CoinAbcBaseFactorization.hpp:968
CoinAbcTypeFactorization::denseVector
double * denseVector(CoinIndexedVector &vector) const
Definition: CoinAbcBaseFactorization.hpp:361
CoinAbcTypeFactorization::updatePartialUpdate
void updatePartialUpdate(CoinIndexedVector &partialUpdate)
Update partial Ftran by R update.
CoinAbcTypeFactorization::numberFtranFullCounts_
CoinSimplexInt numberFtranFullCounts_
Definition: CoinAbcBaseFactorization.hpp:1212
CoinAbcTypeFactorization::numberGoodL_
CoinSimplexInt numberGoodL_
Number factorized in L.
Definition: CoinAbcBaseFactorization.hpp:1009
CoinAbcTypeFactorization::getAreas
virtual void getAreas(CoinSimplexInt numberRows, CoinSimplexInt numberColumns, CoinBigIndex maximumL, CoinBigIndex maximumU)
Gets space for a factorization, called by constructors.
CoinAbcTypeFactorization::indexColumnL
CoinSimplexInt * indexColumnL() const
Index of column in row for L.
Definition: CoinAbcBaseFactorization.hpp:100
CoinAbcTypeFactorization::setDenseThreshold
void setDenseThreshold(CoinSimplexInt value)
Sets dense threshold.
Definition: CoinAbcBaseFactorization.hpp:229
CoinAbcTypeFactorization::pivotRegion_
CoinFactorizationDoubleArrayWithLength pivotRegion_
Inverses of pivot values.
Definition: CoinAbcBaseFactorization.hpp:1095
CoinAbcTypeFactorization::checkReplacePart2
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.
CoinAbcTypeFactorization::maximumRowsExtra_
CoinSimplexInt maximumRowsExtra_
Maximum number of Rows after iterating.
Definition: CoinAbcBaseFactorization.hpp:1005
CoinAbcTypeFactorization::numberElementsL
CoinBigIndex numberElementsL() const
Returns number in L area.
Definition: CoinAbcBaseFactorization.hpp:271
CoinAbcTypeFactorization::numberRowsExtra_
CoinSimplexInt numberRowsExtra_
Number of Rows after iterating.
Definition: CoinAbcBaseFactorization.hpp:1003
CoinAbcTypeFactorization::denseThreshold_
CoinSimplexInt denseThreshold_
Dense threshold (here to use double alignment)
Definition: CoinAbcBaseFactorization.hpp:1181
CoinAbcTypeFactorization::CoinAbcTypeFactorization
CoinAbcTypeFactorization()
Default constructor.
CoinAbcTypeFactorization::updateColumnTransposeL
void updateColumnTransposeL(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column transpose (BTRANL)
CoinAbcTypeFactorization::btranFullCountAfterR_
double btranFullCountAfterR_
Definition: CoinAbcBaseFactorization.hpp:1220
CoinAbcTypeFactorization::indexColumnLAddress_
CoinSimplexInt * indexColumnLAddress_
Definition: CoinAbcBaseFactorization.hpp:990
CoinAbcTypeFactorization::checkMarkArrays
virtual void checkMarkArrays() const
ABC_PARALLEL
#define ABC_PARALLEL
Definition: CoinAbcCommon.hpp:36
CoinAbcTypeFactorization::firstCount_
CoinIntArrayWithLength firstCount_
First Row/Column with count of k, can tell which by offset - Rows then Columns.
Definition: CoinAbcBaseFactorization.hpp:1079
CoinAbcTypeFactorization::startRowLAddress_
CoinBigIndex * startRowLAddress_
Definition: CoinAbcBaseFactorization.hpp:980
CoinAbcTypeFactorization::sizeSparseArray_
CoinBigIndex sizeSparseArray_
Size in bytes of a sparseArray.
Definition: CoinAbcBaseFactorization.hpp:1239
AbcSimplex
Definition: AbcSimplex.hpp:62
CoinAbcTypeFactorization::ftranFullCountAfterU_
double ftranFullCountAfterU_
Definition: CoinAbcBaseFactorization.hpp:1204
CoinAbcTypeFactorization::clone
virtual CoinAbcAnyFactorization * clone() const
Clone.
CoinAbcTypeFactorization::goSparse2
void goSparse2()
CoinAbcTypeFactorization::markRow_
CoinIntArrayWithLength markRow_
Marks rows to be updated.
Definition: CoinAbcBaseFactorization.hpp:1091
CoinAbcTypeFactorization::fromLongArray
void fromLongArray(CoinIndexedVector *vector) const
From a work array and dis-associate vector.
Definition: CoinAbcBaseFactorization.hpp:377
CoinAbcTypeFactorization::ftranFTAverageAfterL_
double ftranFTAverageAfterL_
Definition: CoinAbcBaseFactorization.hpp:1170
CoinAbcTypeFactorization::lastColumn_
CoinIntArrayWithLength lastColumn_
Previous Column in memory order.
Definition: CoinAbcBaseFactorization.hpp:1083
CoinAbcTypeFactorization::deleteLink
void deleteLink(CoinSimplexInt index)
Deletes a link in chain of equal counts.
Definition: CoinAbcBaseFactorization.hpp:707
CoinAbcTypeFactorization::numberTrials_
CoinSimplexInt numberTrials_
Number of trials before rejection.
Definition: CoinAbcBaseFactorization.hpp:1054
CoinAbcTypeFactorization::replaceColumnPFI
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...
CoinAbcTypeFactorization::numberInColumnAddress_
CoinSimplexInt * numberInColumnAddress_
Definition: CoinAbcBaseFactorization.hpp:943
CoinAbcTypeFactorization::setNumberElementsU
void setNumberElementsU(CoinBigIndex value)
Setss number in U area.
Definition: CoinAbcBaseFactorization.hpp:261
CoinAbcTypeFactorization::lengthL_
CoinBigIndex lengthL_
Length of L.
Definition: CoinAbcBaseFactorization.hpp:1032
CoinAbcTypeFactorization::elementRowU_
CoinFactorizationDoubleArrayWithLength elementRowU_
Elements of U by row.
Definition: CoinAbcBaseFactorization.hpp:1116
CoinAbcTypeFactorization::indexColumnU_
CoinIntArrayWithLength indexColumnU_
Base address for U (may change)
Definition: CoinAbcBaseFactorization.hpp:1093
CoinAbcTypeFactorization::lastCount
CoinSimplexInt * lastCount() const
Previous Row/Column with count.
Definition: CoinAbcBaseFactorization.hpp:175
CoinAbcTypeFactorization::elementUAddress_
CoinFactorizationDouble * elementUAddress_
Definition: CoinAbcBaseFactorization.hpp:941
CoinAbcTypeFactorization::updateTwoColumnsUDensish
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.
CoinAbcTypeFactorization::elementU
CoinFactorizationDouble * elementU() const
Elements of U.
Definition: CoinAbcBaseFactorization.hpp:322
CoinAbcTypeFactorization::firstZeroed_
CoinBigIndex firstZeroed_
First place in funny copy zeroed out.
Definition: CoinAbcBaseFactorization.hpp:1016
CoinAbcAnyFactorization
Abstract base class which also has some scalars so can be used from Dense or Simp.
Definition: CoinAbcDenseFactorization.hpp:23
ABC_FAC_GOT_SPARSE
#define ABC_FAC_GOT_SPARSE
Definition: CoinAbcCommonFactorization.hpp:70
CoinAbcTypeFactorization::getRowSpaceIterate
bool getRowSpaceIterate(CoinSimplexInt iRow, CoinSimplexInt extraNeeded)
Gets space for one Row with given length while iterating, may have to do compression (returns True i...
CoinAbcTypeFactorization::startRowUAddress_
CoinBigIndex * startRowUAddress_
Definition: CoinAbcBaseFactorization.hpp:960
CoinAbcTypeFactorization::addLink
void addLink(CoinSimplexInt index, CoinSimplexInt count)
Adds a link in chain of equal counts.
Definition: CoinAbcBaseFactorization.hpp:694
CoinAbcTypeFactorization::CoinAbcFactorizationUnitTest
friend void CoinAbcFactorizationUnitTest(const std::string &mpsDir)
CoinAbcTypeFactorization::firstCountAddress_
CoinSimplexInt * firstCountAddress_
Definition: CoinAbcBaseFactorization.hpp:963
CoinAbcTypeFactorization::gotSparse
bool gotSparse() const
Definition: CoinAbcBaseFactorization.hpp:1256
CoinAbcTypeFactorization::updateColumnUDensish
void updateColumnUDensish(CoinIndexedVector *regionSparse) const
Updates part of column (FTRANU)
CoinAbcTypeFactorization::preProcess3
double preProcess3()
Return largest element.
CoinAbcTypeFactorization::numberBtranCounts_
CoinSimplexInt numberBtranCounts_
Definition: CoinAbcBaseFactorization.hpp:1195
CoinAbcTypeFactorization::setYesGotSparse
void setYesGotSparse()
Definition: CoinAbcBaseFactorization.hpp:1258
CoinAbcTypeFactorization::btranCountAfterL_
double btranCountAfterL_
Definition: CoinAbcBaseFactorization.hpp:1187
CoinAbcTypeFactorization::lastCountAddress_
CoinSimplexInt * lastCountAddress_
Previous Row/Column with count.
Definition: CoinAbcBaseFactorization.hpp:967
CoinAbcTypeFactorization::lengthAreaR_
CoinBigIndex lengthAreaR_
length of area reserved for R
Definition: CoinAbcBaseFactorization.hpp:1026
CoinAbcTypeFactorization::factor
virtual CoinSimplexInt factor(AbcSimplex *model)
Does most of factorization.
CoinAbcTypeFactorization::numberInRow_
CoinIntArrayWithLength numberInRow_
Number in each Row.
Definition: CoinAbcBaseFactorization.hpp:1072
CoinAbcTypeFactorization::checkConsistency
void checkConsistency()
Checks that row and column copies look OK.
CoinAbcHelperFunctions.hpp
CoinAbcTypeFactorization::baseL
CoinBigIndex baseL() const
Base of L.
Definition: CoinAbcBaseFactorization.hpp:192
CoinAbcTypeFactorization::pivotLinkedForwards
CoinSimplexInt * pivotLinkedForwards() const
Definition: CoinAbcBaseFactorization.hpp:126
CoinAbcTypeFactorization::btranFullCountAfterL_
double btranFullCountAfterL_
Definition: CoinAbcBaseFactorization.hpp:1219
CoinAbcTypeFactorization::btranCountAfterR_
double btranCountAfterR_
Definition: CoinAbcBaseFactorization.hpp:1186
CoinAbcTypeFactorization::numberInRow
virtual CoinSimplexInt * numberInRow() const
Number of entries in each row.
Definition: CoinAbcBaseFactorization.hpp:302
CoinAbcTypeFactorization::denseVector
const double * denseVector(const CoinIndexedVector &vector) const
Definition: CoinAbcBaseFactorization.hpp:370
CoinAbcTypeFactorization::separateLinks
void separateLinks()
Separate out links with same row/column count.
CoinAbcTypeFactorization::ftranCountAfterU_
double ftranCountAfterU_
Definition: CoinAbcBaseFactorization.hpp:1153
CoinAbcTypeFactorization::updateColumnTransposeR
void updateColumnTransposeR(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column transpose (BTRANR)
CoinAbcTypeFactorization::startColumnU_
CoinBigIndexArrayWithLength startColumnU_
Start of each column in U.
Definition: CoinAbcBaseFactorization.hpp:1101
checkLinks
#define checkLinks(x)
Definition: CoinAbcBaseFactorization.hpp:691
CoinAbcTypeFactorization::convertColumnToRowUAddress_
CoinBigIndex * convertColumnToRowUAddress_
Definition: CoinAbcBaseFactorization.hpp:954
CoinIndexedVector::denseVector
double * denseVector() const
Get the vector as a dense vector.
Definition: CoinIndexedVector.hpp:121
CoinAbcTypeFactorization::startColumnL
CoinBigIndex * startColumnL() const
Start of each column in L.
Definition: CoinAbcBaseFactorization.hpp:93
CoinAbcAnyFactorization::numberRows
int numberRows() const
Number of Rows after factorization.
Definition: CoinAbcDenseFactorization.hpp:87
CoinAbcTypeFactorization::pivotRowSingleton
bool pivotRowSingleton(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
Does one pivot on Row Singleton in factorization.
CoinAbcTypeFactorization::setYesGotLCopy
void setYesGotLCopy()
Definition: CoinAbcBaseFactorization.hpp:1249
CoinAbcTypeFactorization::updateColumnTransposeLDensish
void updateColumnTransposeLDensish(CoinIndexedVector *region) const
Updates part of column transpose (BTRANL) when densish by column.
CoinAbcTypeFactorization::updateColumnTransposeCpu
virtual void updateColumnTransposeCpu(CoinIndexedVector &regionSparse, int whichCpu) const
Updates one column (BTRAN)
CoinAbcTypeFactorization::factorDense
CoinSimplexInt factorDense()
Does dense phase of factorization return code is &lt;0 error, 0= finished.
CoinAbcTypeFactorization::sparseAddress_
CoinSimplexInt * sparseAddress_
Definition: CoinAbcBaseFactorization.hpp:997
CoinAbcTypeFactorization::updateColumnFTPart2
virtual void updateColumnFTPart2(CoinIndexedVector &regionSparse)
CoinAbcTypeFactorization::lengthR_
CoinBigIndex lengthR_
Length of R stuff.
Definition: CoinAbcBaseFactorization.hpp:1024
CoinAbcTypeFactorization::ftranFullAverageAfterU_
double ftranFullAverageAfterU_
Definition: CoinAbcBaseFactorization.hpp:1207
CoinAbcTypeFactorization::updateWeights
virtual void updateWeights(CoinIndexedVector &regionSparse) const
Updates one column for dual steepest edge weights (FTRAN)
CoinAbcTypeFactorization::checkSparse
void checkSparse()
See if worth going sparse.
CoinAbcTypeFactorization::doAddresses
void doAddresses()
Set up addresses from arrays.
CoinAbcTypeFactorization::spaceForForrestTomlin
bool spaceForForrestTomlin() const
True if FT update and space.
Definition: CoinAbcBaseFactorization.hpp:244
CoinAbcTypeFactorization::pivotColumnSingleton
void pivotColumnSingleton(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
Does one pivot on Column Singleton in factorization (can&#39;t return false)
CoinAbcTypeFactorization::ftranAverageAfterR_
double ftranAverageAfterR_
Definition: CoinAbcBaseFactorization.hpp:1155
CoinAbcTypeFactorization::numberInColumnPlus_
CoinIntArrayWithLength numberInColumnPlus_
Number in each Column including pivoted.
Definition: CoinAbcBaseFactorization.hpp:1076
CoinAbcTypeFactorization::startColumnU
CoinBigIndex * startColumnU() const
Start of each column in U.
Definition: CoinAbcBaseFactorization.hpp:332
CoinAbcTypeFactorization::preProcess4
void preProcess4()
CoinAbcTypeFactorization::ftranFullCountAfterL_
double ftranFullCountAfterL_
Definition: CoinAbcBaseFactorization.hpp:1202
CoinAbcTypeFactorization::messageLevel
CoinSimplexInt messageLevel() const
Level of detail of messages.
Definition: CoinAbcBaseFactorization.hpp:214
CoinAbcTypeFactorization::lastSlack_
CoinSimplexInt lastSlack_
Definition: CoinAbcBaseFactorization.hpp:1147
CoinAbcTypeFactorization::startRowL
CoinBigIndex * startRowL() const
Start of each row in L.
Definition: CoinAbcBaseFactorization.hpp:86
CoinAbcTypeFactorization::afterPivot
void afterPivot(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
After pivoting.
CoinAbcTypeFactorization::numberForrestTomlin
CoinSimplexInt numberForrestTomlin() const
Length of FT vector.
Definition: CoinAbcBaseFactorization.hpp:207
CoinAbcTypeFactorization::ftranFullAverageAfterL_
double ftranFullAverageAfterL_
Definition: CoinAbcBaseFactorization.hpp:1205
CoinAbcTypeFactorization::numberU_
CoinSimplexInt numberU_
Number in U.
Definition: CoinAbcBaseFactorization.hpp:1036
CoinAbcTypeFactorization::ftranAverageAfterU_
double ftranAverageAfterU_
Definition: CoinAbcBaseFactorization.hpp:1156
CoinAbcTypeFactorization::leadingDimension_
CoinSimplexInt leadingDimension_
Leading dimension for dense.
Definition: CoinAbcBaseFactorization.hpp:1057
CoinAbcTypeFactorization::preProcess
virtual void preProcess()
PreProcesses column ordered copy of basis.
CoinAbcTypeFactorization::numberRowsSmall_
CoinSimplexInt numberRowsSmall_
Size of small inverse.
Definition: CoinAbcBaseFactorization.hpp:1007
CoinAbcTypeFactorization::btranAverageAfterR_
double btranAverageAfterR_
Definition: CoinAbcBaseFactorization.hpp:1189
CoinAbcTypeFactorization::reorderU
bool reorderU()
Reorders U so contiguous and in order (if there is space) Returns true if it could.
CoinAbcTypeFactorization::pivotLinkedBackwards
CoinSimplexInt * pivotLinkedBackwards() const
Forward and backward linked lists (numberRows_+2)
Definition: CoinAbcBaseFactorization.hpp:122
CoinAbcAnyFactorization::pivotRow
virtual int * pivotRow() const
Returns pivot row.
COIN_RESTRICT
#define COIN_RESTRICT
Definition: ClpMatrixBase.hpp:21
CoinAbcTypeFactorization::elementL_
CoinFactorizationDoubleArrayWithLength elementL_
Elements of L.
Definition: CoinAbcBaseFactorization.hpp:1119
CoinAbcTypeFactorization::numberFtranCounts_
CoinSimplexInt numberFtranCounts_
Definition: CoinAbcBaseFactorization.hpp:1161
CoinAbcTypeFactorization::ftranFTCountAfterL_
double ftranFTCountAfterL_
Definition: CoinAbcBaseFactorization.hpp:1167
CoinAbcTypeFactorization::pivotRegionAddress_
CoinFactorizationDouble * pivotRegionAddress_
Definition: CoinAbcBaseFactorization.hpp:940
CoinAbcTypeFactorization::lengthAreaL
CoinBigIndex lengthAreaL() const
Returns length of L area.
Definition: CoinAbcBaseFactorization.hpp:276
CoinAbcTypeFactorization::clearArrays
void clearArrays()
Get rid of all memory.
Definition: CoinAbcBaseFactorization.hpp:586
CoinAbcTypeFactorization::setYesGotUCopy
void setYesGotUCopy()
Definition: CoinAbcBaseFactorization.hpp:1255
scatterUpdate
void(* scatterUpdate)(int, CoinFactorizationDouble, const CoinFactorizationDouble *, double *) SCATTER_ATTRIBUTE
Definition: CoinAbcHelperFunctions.hpp:548
CoinAbcTypeFactorization::updateColumn
virtual CoinSimplexInt updateColumn(CoinIndexedVector &regionSparse) const
This version has same effect as above with FTUpdate==false so number returned is always &gt;=0...
CoinAbcTypeFactorization::numberInColumn
virtual CoinSimplexInt * numberInColumn() const
Number of entries in each column.
Definition: CoinAbcBaseFactorization.hpp:307
CoinSimplexDouble
double CoinSimplexDouble
Definition: CoinAbcCommon.hpp:21
CoinAbcTypeFactorization::unpack
void unpack(CoinIndexedVector *regionFrom, CoinIndexedVector *regionTo) const
CoinAbcTypeFactorization::lastEntryByColumnU_
CoinBigIndex lastEntryByColumnU_
Last entry by column for U.
Definition: CoinAbcBaseFactorization.hpp:1044
CoinAbcTypeFactorization::updateColumnTransposeLByRow
void updateColumnTransposeLByRow(CoinIndexedVector *region) const
Updates part of column transpose (BTRANL) when densish by row.
CoinAbcTypeFactorization::lastEntryByRowU_
CoinBigIndex lastEntryByRowU_
Last entry by row for U.
Definition: CoinAbcBaseFactorization.hpp:1052
CoinAbcTypeFactorization::updateColumnUDense
void updateColumnUDense(CoinIndexedVector *regionSparse) const
Updates part of column (FTRANU) when dense (i.e. do as inner products)
CoinAbcTypeFactorization::updateColumnTranspose
virtual CoinSimplexInt updateColumnTranspose(CoinIndexedVector &regionSparse) const
Updates one column (BTRAN) from regionSparse2 regionSparse starts as zero and is zero at end Note - i...
CoinAbcTypeFactorization::ftranFTAverageAfterR_
double ftranFTAverageAfterR_
Definition: CoinAbcBaseFactorization.hpp:1171
CoinAbcTypeFactorization::setNoGotRCopy
void setNoGotRCopy()
Definition: CoinAbcBaseFactorization.hpp:1251
CoinAbcTypeFactorization::replaceColumnU
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.
CoinAbcTypeFactorization::maximumRows_
CoinSimplexInt maximumRows_
Maximum rows (ever) (here to use double alignment)
Definition: CoinAbcBaseFactorization.hpp:1164
CoinAbcTypeFactorization::ftranFTAverageAfterU_
double ftranFTAverageAfterU_
Definition: CoinAbcBaseFactorization.hpp:1172
CoinAbcTypeFactorization::permuteAddress_
CoinSimplexInt * permuteAddress_
Definition: CoinAbcBaseFactorization.hpp:939
ABC_FAC_GOT_UCOPY
#define ABC_FAC_GOT_UCOPY
Definition: CoinAbcCommonFactorization.hpp:69
CoinAbcTypeFactorization::convertRowToColumnUAddress_
CoinBigIndex * convertRowToColumnUAddress_
Definition: CoinAbcBaseFactorization.hpp:952
CoinFactorizationDoubleArrayWithLength::array
CoinFactorizationDouble * array() const
Get Array.
Definition: CoinIndexedVector.hpp:766
CoinAbcTypeFactorization::nextColumn_
CoinIntArrayWithLength nextColumn_
Next Column in memory order.
Definition: CoinAbcBaseFactorization.hpp:1081
CoinAbcTypeFactorization::setNoGotUCopy
void setNoGotUCopy()
Definition: CoinAbcBaseFactorization.hpp:1254
CoinAbcTypeFactorization::ftranFTCountInput_
double ftranFTCountInput_
Definition: CoinAbcBaseFactorization.hpp:1166
CoinAbcTypeFactorization::nextCount
CoinSimplexInt * nextCount() const
Next Row/Column with count.
Definition: CoinAbcBaseFactorization.hpp:169
ABC_SMALL
#define ABC_SMALL
Definition: CoinAbcFactorization.hpp:35
CoinFactorizationDouble
double CoinFactorizationDouble
Definition: CoinTypes.hpp:57
CoinAbcTypeFactorization::updateColumnTransposeUDensish
void updateColumnTransposeUDensish(CoinIndexedVector *region, CoinSimplexInt smallestIndex) const
Updates part of column transpose (BTRANU) when densish, assumes index is sorted i.e.
CoinAbcTypeFactorization::numberL
CoinBigIndex numberL() const
Number in L.
Definition: CoinAbcBaseFactorization.hpp:186
CoinAbcTypeFactorization::fromLongArray
void fromLongArray(int which) const
From a work array and dis-associate vector.
Definition: CoinAbcBaseFactorization.hpp:379
CoinAbcTypeFactorization::indexRowL
CoinSimplexInt * indexRowL() const
Row indices of L.
Definition: CoinAbcBaseFactorization.hpp:107
CoinAbcTypeFactorization::workArea2Address_
CoinSimplexUnsignedInt * workArea2Address_
Definition: CoinAbcBaseFactorization.hpp:996
CoinAbcTypeFactorization::ftranCountInput_
double ftranCountInput_
To decide how to solve.
Definition: CoinAbcBaseFactorization.hpp:1150
CoinAbcTypeFactorization::updateColumnFTPart1
virtual int updateColumnFTPart1(CoinIndexedVector &regionSparse)
CoinAbcTypeFactorization::pivotColumn_
CoinIntArrayWithLength pivotColumn_
Pivot order for each Column.
Definition: CoinAbcBaseFactorization.hpp:1066
CoinAbcTypeFactorization::pivotColumn
virtual CoinSimplexInt * pivotColumn() const
Returns address of pivotColumn region (also used for permuting)
Definition: CoinAbcBaseFactorization.hpp:75
AbcCommon.hpp
CoinAbcTypeFactorization::elementByRowLAddress_
CoinFactorizationDouble * elementByRowLAddress_
Definition: CoinAbcBaseFactorization.hpp:991
CoinAbcTypeFactorization::updateColumnFT
virtual CoinSimplexInt updateColumnFT(CoinIndexedVector &regionSparse)
Later take out return codes (apart from +- 1 on FT)
CoinAbcTypeFactorization::baseL_
CoinBigIndex baseL_
Base of L.
Definition: CoinAbcBaseFactorization.hpp:1030
CoinAbcTypeFactorization::convertColumnToRowU_
CoinBigIndexArrayWithLength convertColumnToRowU_
Converts columns to rows in U.
Definition: CoinAbcBaseFactorization.hpp:1111
CoinBigIndexArrayWithLength
CoinBigIndex * version.
Definition: CoinIndexedVector.hpp:986
CoinAbcTypeFactorization::numberInColumn_
CoinIntArrayWithLength numberInColumn_
Number in each Column.
Definition: CoinAbcBaseFactorization.hpp:1074
CoinIndexedVector
Indexed Vector.
Definition: CoinIndexedVector.hpp:104
CoinAbcTypeFactorization::pivotColumnAddress_
CoinSimplexInt * pivotColumnAddress_
Definition: CoinAbcBaseFactorization.hpp:938
CoinAbcTypeFactorization::gutsOfCopy
void gutsOfCopy(const CoinAbcTypeFactorization &other)
CoinAbcTypeFactorization::elements
virtual CoinFactorizationDouble * elements() const
Returns array to put basis elements in.
Definition: CoinAbcBaseFactorization.hpp:312
CoinIndexedVector::scan
int scan()
Scan dense region and set up indices (returns number found)
CoinAbcTypeFactorization::ftranCountAfterL_
double ftranCountAfterL_
Definition: CoinAbcBaseFactorization.hpp:1151
CoinAbcTypeFactorization::updateColumnTransposeLSparse
void updateColumnTransposeLSparse(CoinIndexedVector *region) const
Updates part of column transpose (BTRANL) when sparse (by Row)
CoinAbcTypeFactorization::workArea_
CoinFactorizationDoubleArrayWithLength workArea_
First work area.
Definition: CoinAbcBaseFactorization.hpp:1129
CoinAbcTypeFactorization::btranFullAverageAfterL_
double btranFullAverageAfterL_
Definition: CoinAbcBaseFactorization.hpp:1222
CoinAbcTypeFactorization::btranCountAfterU_
double btranCountAfterU_
Definition: CoinAbcBaseFactorization.hpp:1185
CoinAbcTypeFactorization::gotUCopy
bool gotUCopy() const
Definition: CoinAbcBaseFactorization.hpp:1253
CoinAbcTypeFactorization::maximumU_
CoinBigIndex maximumU_
Maximum space used in U.
Definition: CoinAbcBaseFactorization.hpp:1038
CoinAbcTypeFactorization::indexRowU_
CoinIntArrayWithLength indexRowU_
Row indices of U.
Definition: CoinAbcBaseFactorization.hpp:1099
CoinAbcTypeFactorization::nextCountAddress_
CoinSimplexInt * nextCountAddress_
Next Row/Column with count.
Definition: CoinAbcBaseFactorization.hpp:965
CoinAbcTypeFactorization::pivotLOrderAddress_
CoinSimplexInt * pivotLOrderAddress_
Definition: CoinAbcBaseFactorization.hpp:984
CoinAbcTypeFactorization::lengthU_
CoinBigIndex lengthU_
Length of U.
Definition: CoinAbcBaseFactorization.hpp:1040
CoinAbcTypeFactorization::saveColumnAddress_
CoinSimplexInt * saveColumnAddress_
Definition: CoinAbcBaseFactorization.hpp:972
CoinAbcTypeFactorization::indexRowRAddress_
CoinSimplexInt * indexRowRAddress_
Row indices for R.
Definition: CoinAbcBaseFactorization.hpp:989
CoinAbcTypeFactorization::updateColumnL
void updateColumnL(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column (FTRANL)
CoinAbcTypeFactorization::updateColumnTransposeRSparse
void updateColumnTransposeRSparse(CoinIndexedVector *region) const
Updates part of column transpose (BTRANR) when sparse.
CoinAbcTypeFactorization::startRowU_
CoinBigIndexArrayWithLength startRowU_
Start of each Row as pointer.
Definition: CoinAbcBaseFactorization.hpp:1070
CoinAbcTypeFactorization::initialNumberRows_
CoinSimplexInt initialNumberRows_
Rows first time nonzero.
Definition: CoinAbcBaseFactorization.hpp:1215
CoinAbcTypeFactorization::indexRowLAddress_
CoinSimplexInt * indexRowLAddress_
Definition: CoinAbcBaseFactorization.hpp:977
CoinAbcTypeFactorization::nextRowAddress_
CoinSimplexInt * nextRowAddress_
Definition: CoinAbcBaseFactorization.hpp:970
CoinAbcTypeFactorization::updateFullColumnTranspose
virtual void updateFullColumnTranspose(CoinIndexedVector &regionSparse) const
Updates one full column (BTRAN)
CoinAbcTypeFactorization::updateColumnLDense
void updateColumnLDense(CoinIndexedVector *region) const
Updates part of column (FTRANL) when dense (i.e. do as inner products)
CoinAbcTypeFactorization::elementRAddress_
CoinFactorizationDouble * elementRAddress_
Elements of R.
Definition: CoinAbcBaseFactorization.hpp:987
CoinAbcTypeFactorization::updateColumnR
void updateColumnR(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column (FTRANR) without FT update.
CoinAbcTypeFactorization::elementRowUAddress_
CoinFactorizationDouble * elementRowUAddress_
Definition: CoinAbcBaseFactorization.hpp:958
CoinAbcTypeFactorization::adjustedAreaFactor
CoinSimplexDouble adjustedAreaFactor() const
Returns areaFactor but adjusted for dense.
CoinAbcTypeFactorization::permute
CoinSimplexInt * permute() const
Returns address of permute region.
Definition: CoinAbcBaseFactorization.hpp:65
CoinAbcTypeFactorization::indexColumnUAddress_
CoinSimplexInt * indexColumnUAddress_
Definition: CoinAbcBaseFactorization.hpp:962
CoinAbcTypeFactorization::totalElements_
CoinBigIndex totalElements_
Number of elements in U (to go) or while iterating total overall.
Definition: CoinAbcBaseFactorization.hpp:1014
CoinAbcTypeFactorization::nextRow_
CoinIntArrayWithLength nextRow_
Next Row in memory order.
Definition: CoinAbcBaseFactorization.hpp:1085
CoinAbcTypeFactorization::checkPivot
CoinSimplexInt checkPivot(CoinSimplexDouble saveFromU, CoinSimplexDouble oldPivot) const
Returns accuracy status of replaceColumn returns 0=OK, 1=Probably OK, 2=singular. ...
CoinCheckZero
unsigned char CoinCheckZero
Definition: CoinAbcCommon.hpp:226
CoinAbcTypeFactorization::workAreaAddress_
CoinFactorizationDouble * workAreaAddress_
Definition: CoinAbcBaseFactorization.hpp:995
CoinAbcTypeFactorization::workArea2_
CoinUnsignedIntArrayWithLength workArea2_
Second work area.
Definition: CoinAbcBaseFactorization.hpp:1131
CoinAbcTypeFactorization
Definition: CoinAbcBaseFactorization.hpp:28
CoinAbcTypeFactorization::setNoGotLCopy
void setNoGotLCopy()
Definition: CoinAbcBaseFactorization.hpp:1248
CoinAbcTypeFactorization::startColumnL_
CoinBigIndexArrayWithLength startColumnL_
Start of each column in L.
Definition: CoinAbcBaseFactorization.hpp:1123
CoinAbcTypeFactorization::pivot
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
CoinAbcTypeFactorization::toLongArray
void toLongArray(CoinIndexedVector *vector, int which) const
To a work array and associate vector.
Definition: CoinAbcBaseFactorization.hpp:375
CoinAbcTypeFactorization::resetStatistics
void resetStatistics()
Reset all sparsity etc statistics.
CoinAbcTypeFactorization::updateColumnLSparse
void updateColumnLSparse(CoinIndexedVector *region) const
Updates part of column (FTRANL) when sparse.
CoinAbcTypeFactorization::pivotRegion
virtual CoinFactorizationDouble * pivotRegion() const
Returns address of pivot region.
Definition: CoinAbcBaseFactorization.hpp:80
CoinAbcTypeFactorization::numberRowsLeft_
CoinSimplexInt numberRowsLeft_
Number Rows left (numberRows-numberGood)
Definition: CoinAbcBaseFactorization.hpp:1011
CoinAbcTypeFactorization::operator=
CoinAbcTypeFactorization & operator=(const CoinAbcTypeFactorization &other)
= copy
CoinAbcTypeFactorization::conditionNumber
CoinSimplexDouble conditionNumber() const
Condition number - product of pivots after factorization.
CoinAbcTypeFactorization::pivotLinkedForwardsAddress_
CoinSimplexInt * pivotLinkedForwardsAddress_
Definition: CoinAbcBaseFactorization.hpp:983
CoinAbcTypeFactorization::sparse_
CoinIntArrayWithLength sparse_
Sparse regions.
Definition: CoinAbcBaseFactorization.hpp:1140
CoinAbcTypeFactorization::~CoinAbcTypeFactorization
virtual ~CoinAbcTypeFactorization()
Destructor.
CoinAbcTypeFactorization::state_
CoinSimplexInt state_
State of saved version and what can be done 0 - nothing saved 1 - saved and can go back to previous s...
Definition: CoinAbcBaseFactorization.hpp:1237
CoinAbcTypeFactorization::lastColumnAddress_
CoinSimplexInt * lastColumnAddress_
Definition: CoinAbcBaseFactorization.hpp:969
CoinAbcAnyFactorization::checkReplacePart1a
virtual void checkReplacePart1a(CoinIndexedVector *, int)
Definition: CoinAbcDenseFactorization.hpp:299
CoinAbcTypeFactorization::updateColumnU
void updateColumnU(CoinIndexedVector *region, CoinAbcStatistics &statistics) const
Updates part of column (FTRANU)
CoinAbcTypeFactorization::postProcess
virtual void postProcess(const CoinSimplexInt *sequence, CoinSimplexInt *pivotVariable)
Does post processing on valid factorization - putting variables on correct rows.
CoinAbcTypeFactorization::elementLAddress_
CoinFactorizationDouble * elementLAddress_
Definition: CoinAbcBaseFactorization.hpp:976
CoinAbcTypeFactorization::numberElementsU
CoinBigIndex numberElementsU() const
Returns number in U area.
Definition: CoinAbcBaseFactorization.hpp:256
CoinAbcTypeFactorization::numberInColumnPlusAddress_
CoinSimplexInt * numberInColumnPlusAddress_
Definition: CoinAbcBaseFactorization.hpp:944
CoinAbcTypeFactorization::sort
void sort() const
Debug - sort so can compare.
CoinAbcTypeFactorization::ftranFullCountAfterR_
double ftranFullCountAfterR_
Definition: CoinAbcBaseFactorization.hpp:1203
CoinAbcTypeFactorization::denseAreaAddress_
CoinFactorizationDouble * denseAreaAddress_
Definition: CoinAbcBaseFactorization.hpp:993
CoinAbcTypeFactorization::pivotLOrder
CoinSimplexInt * pivotLOrder() const
Definition: CoinAbcBaseFactorization.hpp:130
CoinAbcTypeFactorization::btranAverageAfterU_
double btranAverageAfterU_
Definition: CoinAbcBaseFactorization.hpp:1188
CoinAbcTypeFactorization::pack
void pack(CoinIndexedVector *regionFrom, CoinIndexedVector *regionTo) const
CoinAbcTypeFactorization::lastRowAddress_
CoinSimplexInt * lastRowAddress_
Definition: CoinAbcBaseFactorization.hpp:971
CoinAbcTypeFactorization::printRegion
void printRegion(const CoinIndexedVector &vector, const char *where) const
CoinAbcTypeFactorization::updateColumnCpu
virtual void updateColumnCpu(CoinIndexedVector &regionSparse, int whichCpu) const
Updates one column (FTRAN)
CoinFactorizationDoubleArrayWithLength
CoinFactorizationDouble * version.
Definition: CoinIndexedVector.hpp:755
CoinAbcTypeFactorization::storeFT
bool storeFT(const CoinIndexedVector *regionFT)
Store update after doing L and R - retuns false if no room.
CoinAbcTypeFactorization::elementByRowL
CoinFactorizationDouble * elementByRowL() const
Elements in L (row copy)
Definition: CoinAbcBaseFactorization.hpp:114
CoinAbcStatistics
Definition: CoinAbcCommonFactorization.hpp:32
CoinBigIndex
int CoinBigIndex
Definition: Coin_C_defines.h:136
CoinAbcTypeFactorization::numberRowsExtra
CoinSimplexInt numberRowsExtra() const
Number of Rows after iterating.
Definition: CoinAbcBaseFactorization.hpp:181
CoinAbcTypeFactorization::scan
void scan(CoinIndexedVector *vector) const
Scans region to find nonzeros.
Definition: CoinAbcBaseFactorization.hpp:381
CoinAbcTypeFactorization::updateColumnTransposeUByColumn
void updateColumnTransposeUByColumn(CoinIndexedVector *region, CoinSimplexInt smallestIndex) const
Updates part of column transpose (BTRANU) by column assumes index is sorted i.e.
CoinAbcTypeFactorization::checkReplacePart1
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...
CoinAbcTypeFactorization::elementU_
CoinFactorizationDoubleArrayWithLength elementU_
Elements of U.
Definition: CoinAbcBaseFactorization.hpp:1097
CoinAbcTypeFactorization::numberElements
virtual CoinBigIndex numberElements() const
Total number of elements in factorization.
Definition: CoinAbcBaseFactorization.hpp:202
CoinAbcTypeFactorization::denseArea_
CoinFactorizationDoubleArrayWithLength denseArea_
Dense area.
Definition: CoinAbcBaseFactorization.hpp:1126
ABC_FAC_GOT_RCOPY
#define ABC_FAC_GOT_RCOPY
Definition: CoinAbcCommonFactorization.hpp:68
CoinAbcTypeFactorization::ftranFullAverageAfterR_
double ftranFullAverageAfterR_
Definition: CoinAbcBaseFactorization.hpp:1206
CoinAbcTypeFactorization::pivotOneOtherRow
bool pivotOneOtherRow(CoinSimplexInt pivotRow, CoinSimplexInt pivotColumn)
Pivots when just one other row so faster?
CoinAbcTypeFactorization::numberFtranFTCounts_
CoinSimplexInt numberFtranFTCounts_
Definition: CoinAbcBaseFactorization.hpp:1177
CoinAbcTypeFactorization::cleanup
void cleanup()
Cleans up at end of factorization.
CoinFactorizationLongDoubleArrayWithLength
CoinFactorizationLongDouble * version.
Definition: CoinIndexedVector.hpp:832
scatterStruct
Definition: CoinAbcHelperFunctions.hpp:549
CoinAbcTypeFactorization::updateColumnTransposePFI
void updateColumnTransposePFI(CoinIndexedVector *region) const
Updates part of column transpose PFI (BTRAN) (before rest)
FACTOR_CPU
#define FACTOR_CPU
This deals with Factorization and Updates.
Definition: CoinAbcBaseFactorization.hpp:23
CoinAbcTypeFactorization::replaceColumnPart3
virtual void replaceColumnPart3(const AbcSimplex *model, CoinIndexedVector *regionSparse, CoinIndexedVector *tableauColumn, int pivotRow, double alpha)
Replaces one Column to basis, partial update already in U.
CoinFactorization
This deals with Factorization and Updates.
Definition: CoinFactorization.hpp:50
CoinAbcTypeFactorization::messageLevel_
CoinSimplexInt messageLevel_
Detail in messages.
Definition: CoinAbcBaseFactorization.hpp:1143
CoinAbcTypeFactorization::lengthAreaU
CoinBigIndex lengthAreaU() const
Returns length of U area.
Definition: CoinAbcBaseFactorization.hpp:266
CoinAbcTypeFactorization::startColumnRAddress_
CoinBigIndex * startColumnRAddress_
Definition: CoinAbcBaseFactorization.hpp:985
CoinAbcTypeFactorization::updateFullColumn
virtual void updateFullColumn(CoinIndexedVector &regionSparse) const
Updates one full column (FTRAN)
CoinAbcTypeFactorization::setNoGotSparse
void setNoGotSparse()
Definition: CoinAbcBaseFactorization.hpp:1257
CoinAbcTypeFactorization::lengthAreaL_
CoinBigIndex lengthAreaL_
Length of area reserved for L.
Definition: CoinAbcBaseFactorization.hpp:1034
CoinAbcAnyFactorization::checkReplacePart1b
virtual double checkReplacePart1b(CoinIndexedVector *, int)
Definition: CoinAbcDenseFactorization.hpp:303
CoinIntArrayWithLength::array
int * array() const
Get Array.
Definition: CoinIndexedVector.hpp:920
CoinAbcTypeFactorization::modifyLink
void modifyLink(CoinSimplexInt index, CoinSimplexInt count)
Modifies links in chain of equal counts.
Definition: CoinAbcBaseFactorization.hpp:726
CoinAbcTypeFactorization::wantsTableauColumn
virtual bool wantsTableauColumn() const
Returns true if wants tableauColumn in replaceColumn.
Definition: CoinAbcBaseFactorization.hpp:503
CoinAbcTypeFactorization::startColumnUAddress_
CoinBigIndex * startColumnUAddress_
Definition: CoinAbcBaseFactorization.hpp:950
CoinAbcTypeFactorization::saveColumn_
CoinIntArrayWithLength saveColumn_
Columns left to do in a single pivot.
Definition: CoinAbcBaseFactorization.hpp:1089
CoinAbcTypeFactorization::updateColumnTransposeU
void updateColumnTransposeU(CoinIndexedVector *region, CoinSimplexInt smallestIndex, CoinAbcStatistics &statistics) const
Updates part of column transpose (BTRANU), assumes index is sorted i.e.
CoinAbcTypeFactorization::updateColumnLDensish
void updateColumnLDensish(CoinIndexedVector *region) const
Updates part of column (FTRANL) when densish.
CoinAbcTypeFactorization::btranFullCountInput_
double btranFullCountInput_
To decide how to solve.
Definition: CoinAbcBaseFactorization.hpp:1218
CoinAbcTypeFactorization::updateTwoColumnsFT
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...
CoinAbcTypeFactorization::sparseThreshold_
CoinSimplexInt sparseThreshold_
Below this use sparse technology - if 0 then no L row copy.
Definition: CoinAbcBaseFactorization.hpp:1019
CoinAbcTypeFactorization::numberR_
CoinSimplexInt numberR_
Number in R.
Definition: CoinAbcBaseFactorization.hpp:1022
CoinAbcTypeFactorization::gutsOfDestructor
void gutsOfDestructor(CoinSimplexInt type=1)
The real work of constructors etc 0 just scalars, 1 bit normal.
CoinAbcTypeFactorization::indexRowUAddress_
CoinSimplexInt * indexRowUAddress_
Definition: CoinAbcBaseFactorization.hpp:942
CoinIntArrayWithLength
int * version
Definition: CoinIndexedVector.hpp:909
CoinAbcTypeFactorization::elementByRowL_
CoinFactorizationDoubleArrayWithLength elementByRowL_
Elements in L (row copy)
Definition: CoinAbcBaseFactorization.hpp:1138
CoinAbcTypeFactorization::updateColumnUSparse
void updateColumnUSparse(CoinIndexedVector *regionSparse) const
Updates part of column (FTRANU) when sparse.
CoinSimplexInt
int CoinSimplexInt
Definition: CoinAbcCommon.hpp:22
CoinAbcTypeFactorization::getColumnSpaceIterate
CoinBigIndex getColumnSpaceIterate(CoinSimplexInt iColumn, CoinFactorizationDouble value, CoinSimplexInt iRow)
getColumnSpaceIterate.
CoinAbcTypeFactorization::getColumnSpaceIterateR
bool getColumnSpaceIterateR(CoinSimplexInt iColumn, CoinFactorizationDouble value, CoinSimplexInt iRow)
getColumnSpaceIterateR.
CoinAbcTypeFactorization::wantToGoDense
int wantToGoDense()
After pivoting - returns true if need to go dense.
CoinAbcTypeFactorization::markRowAddress_
CoinCheckZero * markRowAddress_
Definition: CoinAbcBaseFactorization.hpp:974
CoinAbcTypeFactorization::lengthAreaU_
CoinBigIndex lengthAreaU_
Length of area reserved for U.
Definition: CoinAbcBaseFactorization.hpp:1042
CoinAbcTypeFactorization::firstCount
CoinSimplexInt * firstCount() const
For equal counts in factorization.
Definition: CoinAbcBaseFactorization.hpp:163
CoinAbcTypeFactorization::permute_
CoinIntArrayWithLength permute_
Permutation vector for pivot row order.
Definition: CoinAbcBaseFactorization.hpp:1068
CoinAbcTypeFactorization::btranFullAverageAfterU_
double btranFullAverageAfterU_
Definition: CoinAbcBaseFactorization.hpp:1224
CoinAbcTypeFactorization::gotLCopy
bool gotLCopy() const
Definition: CoinAbcBaseFactorization.hpp:1244
ABC_FAC_GOT_LCOPY
#define ABC_FAC_GOT_LCOPY
Definition: CoinAbcCommonFactorization.hpp:67
CoinAbcTypeFactorization::makeNonSingular
virtual void makeNonSingular(CoinSimplexInt *sequence)
Makes a non-singular basis by replacing variables.
CoinAbcTypeFactorization::factorSparse
CoinSimplexInt factorSparse()
Does sparse phase of factorization return code is &lt;0 error, 0= finished.
CoinAbcTypeFactorization::show_self
void show_self() const
Debug show object (shows one representation)
CoinAbcTypeFactorization::getColumnSpace
bool getColumnSpace(CoinSimplexInt iColumn, CoinSimplexInt extraNeeded)
Gets space for one Column with given length, may have to do compression (returns True if successful)...
CoinArbitraryArrayWithLength
arbitrary version
Definition: CoinIndexedVector.hpp:1217
CoinAbcTypeFactorization::goSparse
void goSparse()
makes a row copy of L for speed and to allow very sparse problems
Definition: CoinAbcBaseFactorization.hpp:565
CoinAbcTypeFactorization::gotRCopy
bool gotRCopy() const
Definition: CoinAbcBaseFactorization.hpp:1250
CoinAbcTypeFactorization::denseVector
double * denseVector(CoinIndexedVector *vector) const
Returns double * associated with vector.
Definition: CoinAbcBaseFactorization.hpp:357
CoinAbcTypeFactorization::maximumRowsExtra
CoinSimplexInt maximumRowsExtra() const
Maximum of Rows after iterating.
Definition: CoinAbcBaseFactorization.hpp:197
CoinAbcTypeFactorization::denseThreshold
CoinSimplexInt denseThreshold() const
Gets dense threshold.
Definition: CoinAbcBaseFactorization.hpp:224
CoinAbcTypeFactorization::numberInRowAddress_
CoinSimplexInt * numberInRowAddress_
Definition: CoinAbcBaseFactorization.hpp:961
CoinAbcTypeFactorization::numberElementsR
CoinBigIndex numberElementsR() const
Returns number in R area.
Definition: CoinAbcBaseFactorization.hpp:281
CoinAbcTypeFactorization::btranFullAverageAfterR_
double btranFullAverageAfterR_
Definition: CoinAbcBaseFactorization.hpp:1223
CoinAbcTypeFactorization::numberCompressions
CoinBigIndex numberCompressions() const
Number of compressions done.
Definition: CoinAbcBaseFactorization.hpp:286
CoinAbcTypeFactorization::maximumCoefficient
CoinSimplexDouble maximumCoefficient() const
Returns maximum absolute value in factorization.
CoinAbcTypeFactorization::sparseThreshold
CoinSimplexInt sparseThreshold() const
get sparse threshold
Definition: CoinAbcBaseFactorization.hpp:572
CoinAbcTypeFactorization::indexRowU
CoinSimplexInt * indexRowU() const
Row indices of U.
Definition: CoinAbcBaseFactorization.hpp:327
CoinAbcTypeFactorization::ftranFullCountInput_
double ftranFullCountInput_
To decide how to solve.
Definition: CoinAbcBaseFactorization.hpp:1201
CoinAbcTypeFactorization::indices
virtual CoinSimplexInt * indices() const
Returns array to put basis indices in.
Definition: CoinAbcBaseFactorization.hpp:70
CoinAbcTypeFactorization::pivotLinkedBackwardsAddress_
CoinSimplexInt * pivotLinkedBackwardsAddress_
Definition: CoinAbcBaseFactorization.hpp:982
CoinAbcTypeFactorization::numberBtranFullCounts_
CoinSimplexInt numberBtranFullCounts_
Definition: CoinAbcBaseFactorization.hpp:1229
CoinAbcAnyFactorization::maximumPivots
int maximumPivots() const
Maximum number of pivots between factorizations.
Definition: CoinAbcDenseFactorization.hpp:111
CoinAbcAnyFactorization::zeroTolerance_
double zeroTolerance_
Zero tolerance.
Definition: CoinAbcDenseFactorization.hpp:392
CoinAbcTypeFactorization::indexColumnL_
CoinIntArrayWithLength indexColumnL_
Index of column in row for L.
Definition: CoinAbcBaseFactorization.hpp:1136
CoinAbcTypeFactorization::starts
virtual CoinBigIndex * starts() const
Returns pivot row.
Definition: CoinAbcBaseFactorization.hpp:297
CoinAbcTypeFactorization::ftranCountAfterR_
double ftranCountAfterR_
Definition: CoinAbcBaseFactorization.hpp:1152
CoinAbcTypeFactorization::almostDestructor
void almostDestructor()
Delete all stuff (leaves as after CoinAbcFactorization())
CoinAbcTypeFactorization::convertRowToColumnU_
CoinBigIndexArrayWithLength convertRowToColumnU_
Converts rows to columns in U.
Definition: CoinAbcBaseFactorization.hpp:1108
CoinAbcTypeFactorization::updateColumnPFI
void updateColumnPFI(CoinIndexedVector *regionSparse) const
Updates part of column PFI (FTRAN) (after rest)
CoinAbcTypeFactorization::btranCountInput_
double btranCountInput_
Definition: CoinAbcBaseFactorization.hpp:1184
CoinAbcTypeFactorization::numberCompressions_
CoinBigIndex numberCompressions_
Number of compressions done.
Definition: CoinAbcBaseFactorization.hpp:1145
CoinAbcTypeFactorization::getRowSpace
bool getRowSpace(CoinSimplexInt iRow, CoinSimplexInt extraNeeded)
Gets space for one Row with given length, may have to do compression (returns True if successful)...
CoinSimplexUnsignedInt
unsigned int CoinSimplexUnsignedInt
Definition: CoinAbcCommon.hpp:23
CoinAbcTypeFactorization::listAddress_
CoinSimplexInt * listAddress_
Definition: CoinAbcBaseFactorization.hpp:975
CoinAbcTypeFactorization::denseVector
const double * denseVector(const CoinIndexedVector *vector) const
Returns double * associated with vector.
Definition: CoinAbcBaseFactorization.hpp:366