Changeset 2385 for trunk/Clp/src/ClpNetworkBasis.hpp
 Timestamp:
 Jan 6, 2019 2:43:06 PM (4 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/Clp/src/ClpNetworkBasis.hpp
r2271 r2385 23 23 */ 24 24 25 26 25 class ClpNetworkBasis { 27 26 28 27 public: 28 /**@name Constructors and destructor and copy */ 29 //@{ 30 /// Default constructor 31 ClpNetworkBasis(); 32 /// Constructor from CoinFactorization 33 ClpNetworkBasis(const ClpSimplex *model, 34 int numberRows, const CoinFactorizationDouble *pivotRegion, 35 const int *permuteBack, const int *startColumn, 36 const int *numberInColumn, 37 const int *indexRow, const CoinFactorizationDouble *element); 38 /// Copy constructor 39 ClpNetworkBasis(const ClpNetworkBasis &other); 29 40 30 /**@name Constructors and destructor and copy */ 31 //@{ 32 /// Default constructor 33 ClpNetworkBasis ( ); 34 /// Constructor from CoinFactorization 35 ClpNetworkBasis(const ClpSimplex * model, 36 int numberRows, const CoinFactorizationDouble * pivotRegion, 37 const int * permuteBack, const int * startColumn, 38 const int * numberInColumn, 39 const int * indexRow, const CoinFactorizationDouble * element); 40 /// Copy constructor 41 ClpNetworkBasis ( const ClpNetworkBasis &other); 41 /// Destructor 42 ~ClpNetworkBasis(); 43 /// = copy 44 ClpNetworkBasis &operator=(const ClpNetworkBasis &other); 45 //@} 42 46 43 /// Destructor 44 ~ClpNetworkBasis ( ); 45 /// = copy 46 ClpNetworkBasis & operator = ( const ClpNetworkBasis & other ); 47 //@} 48 49 /**@name Do factorization */ 50 //@{ 51 /** When part of LP  given by basic variables. 47 /**@name Do factorization */ 48 //@{ 49 /** When part of LP  given by basic variables. 52 50 Actually does factorization. 53 51 Arrays passed in have non negative value to say basic. … … 57 55 and ones thrown out have 1 58 56 returns 0 okay, 1 singular, 2 too many in basis */ 59 int factorize ( const ClpMatrixBase *matrix,60 61 57 int factorize(const ClpMatrixBase *matrix, 58 int rowIsBasic[], int columnIsBasic[]); 59 //@} 62 60 63 64 61 /**@name rank one updates which do exist */ 62 //@{ 65 63 66 64 /** Replaces one Column to basis, 67 65 returns 0=OK, 1=Probably OK, 2=singular!! 68 66 */ 69 int replaceColumn ( CoinIndexedVector *column,70 71 67 int replaceColumn(CoinIndexedVector *column, 68 int pivotRow); 69 //@} 72 70 73 71 /**@name various uses of factorization (return code number elements) 74 72 which user may want to know about */ 75 76 73 //@{ 74 /** Updates one column (FTRAN) from region, 77 75 Returns pivot value if "pivotRow" >=0 78 76 */ 79 double updateColumn ( CoinIndexedVector *regionSparse,80 CoinIndexedVector *regionSparse2,81 82 77 double updateColumn(CoinIndexedVector *regionSparse, 78 CoinIndexedVector *regionSparse2, 79 int pivotRow); 80 /** Updates one column (FTRAN) to/from array 83 81 ** For large problems you should ALWAYS know where the nonzeros 84 82 are, so please try and migrate to previous method after you 85 83 have got code working using this simple method  thank you! 86 84 (the only exception is if you know input is dense e.g. rhs) */ 87 int updateColumn ( CoinIndexedVector *regionSparse,88 double array[]) const;89 85 int updateColumn(CoinIndexedVector *regionSparse, 86 double array[]) const; 87 /** Updates one column transpose (BTRAN) 90 88 ** For large problems you should ALWAYS know where the nonzeros 91 89 are, so please try and migrate to previous method after you … … 93 91 (the only exception is if you know input is dense e.g. dense objective) 94 92 returns number of nonzeros */ 95 int updateColumnTranspose ( CoinIndexedVector *regionSparse,96 double array[]) const;97 98 int updateColumnTranspose ( CoinIndexedVector *regionSparse,99 CoinIndexedVector *regionSparse2) const;100 101 ////////////////// data //////////////////93 int updateColumnTranspose(CoinIndexedVector *regionSparse, 94 double array[]) const; 95 /** Updates one column (BTRAN) from region2 */ 96 int updateColumnTranspose(CoinIndexedVector *regionSparse, 97 CoinIndexedVector *regionSparse2) const; 98 //@} 99 ////////////////// data ////////////////// 102 100 private: 103 104 // checks looks okay 105 void check(); 106 // prints data 107 void print(); 108 /**@name data */ 109 //@{ 101 // checks looks okay 102 void check(); 103 // prints data 104 void print(); 105 /**@name data */ 106 //@{ 110 107 #ifndef COIN_FAST_CODE 111 112 108 /// Whether slack value is +1 or 1 109 double slackValue_; 113 110 #endif 114 115 116 117 118 119 const ClpSimplex *model_;120 121 int *parent_;122 123 int *descendant_;124 125 int *pivot_;126 127 int *rightSibling_;128 129 int *leftSibling_;130 131 double *sign_;132 133 int *stack_;134 135 int *permute_;136 137 int *permuteBack_;138 139 int *stack2_;140 141 int *depth_;142 143 char *mark_;144 111 /// Number of Rows in factorization 112 int numberRows_; 113 /// Number of Columns in factorization 114 int numberColumns_; 115 /// model 116 const ClpSimplex *model_; 117 /// Parent for each column 118 int *parent_; 119 /// Descendant 120 int *descendant_; 121 /// Pivot row 122 int *pivot_; 123 /// Right sibling 124 int *rightSibling_; 125 /// Left sibling 126 int *leftSibling_; 127 /// Sign of pivot 128 double *sign_; 129 /// Stack 130 int *stack_; 131 /// Permute into array 132 int *permute_; 133 /// Permute back array 134 int *permuteBack_; 135 /// Second stack 136 int *stack2_; 137 /// Depth 138 int *depth_; 139 /// To mark rows 140 char *mark_; 141 //@} 145 142 }; 146 143 #endif 144 145 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2 146 */
Note: See TracChangeset
for help on using the changeset viewer.