1414
1515namespace hipo {
1616
17- Factorise::Factorise (const Symbolic& S, const std::vector<Int>& rowsA ,
18- const std::vector<Int>& ptrA ,
19- const std::vector<double >& valA , const Regul& regul,
17+ Factorise::Factorise (const Symbolic& S, const std::vector<Int>& rowsM ,
18+ const std::vector<Int>& ptrM ,
19+ const std::vector<double >& valM , const Regul& regul,
2020 const Log* log, DataCollector& data,
2121 std::vector<std::vector<double >>& sn_columns,
2222 CliqueStack* stack)
@@ -30,7 +30,7 @@ Factorise::Factorise(const Symbolic& S, const std::vector<Int>& rowsA,
3030 // factorisation coming from Analyse.
3131 // Only the lower triangular part of the matrix is used.
3232
33- n_ = ptrA .size () - 1 ;
33+ n_ = ptrM .size () - 1 ;
3434
3535 if (n_ != S_.size ()) {
3636 if (log_)
@@ -41,22 +41,22 @@ Factorise::Factorise(const Symbolic& S, const std::vector<Int>& rowsA,
4141 }
4242
4343 // Make a copy of the matrix to be factorised
44- rowsA_ = rowsA ;
45- valA_ = valA ;
46- ptrA_ = ptrA ;
44+ rowsM_ = rowsM ;
45+ valM_ = valM ;
46+ ptrM_ = ptrM ;
4747
4848 // Permute the matrix.
4949 // This also removes any entry not in the lower triangle.
5050 permute (S_.iperm ());
5151
52- nzA_ = ptrA_ .back ();
52+ nzM_ = ptrM_ .back ();
5353
5454 // Double transpose to sort columns
5555 std::vector<Int> temp_ptr (n_ + 1 );
56- std::vector<Int> temp_rows (nzA_ );
57- std::vector<double > temp_val (nzA_ );
58- transpose (ptrA_, rowsA_, valA_ , temp_ptr, temp_rows, temp_val);
59- transpose (temp_ptr, temp_rows, temp_val, ptrA_, rowsA_, valA_ );
56+ std::vector<Int> temp_rows (nzM_ );
57+ std::vector<double > temp_val (nzM_ );
58+ transpose (ptrM_, rowsM_, valM_ , temp_ptr, temp_rows, temp_val);
59+ transpose (temp_ptr, temp_rows, temp_val, ptrM_, rowsM_, valM_ );
6060
6161 // create linked lists of children in supernodal elimination tree
6262 childrenLinkedList (S_.snParent (), first_child_, next_child_);
@@ -70,28 +70,28 @@ Factorise::Factorise(const Symbolic& S, const std::vector<Int>& rowsA,
7070 max_diag_ = 0.0 ;
7171 min_diag_ = kHighsInf ;
7272 for (Int col = 0 ; col < n_; ++col) {
73- double val = std::abs (valA_[ptrA_ [col]]);
73+ double val = std::abs (valM_[ptrM_ [col]]);
7474 max_diag_ = std::max (max_diag_, val);
7575 min_diag_ = std::min (min_diag_, val);
7676 }
7777
78- // one norm of columns of A
78+ // one norm of columns of M
7979 std::vector<double > one_norm_cols (n_, 0.0 );
8080 for (Int col = 0 ; col < n_; ++col) {
81- for (Int el = ptrA_ [col]; el < ptrA_ [col + 1 ]; ++el) {
82- Int row = rowsA_ [el];
83- double val = valA_ [el];
81+ for (Int el = ptrM_ [col]; el < ptrM_ [col + 1 ]; ++el) {
82+ Int row = rowsM_ [el];
83+ double val = valM_ [el];
8484 one_norm_cols[col] += std::abs (val);
8585 if (row != col) one_norm_cols[row] += std::abs (val);
8686 }
8787 }
88- A_norm1_ = *std::max_element (one_norm_cols.begin (), one_norm_cols.end ());
88+ M_norm1_ = *std::max_element (one_norm_cols.begin (), one_norm_cols.end ());
8989
90- data_.setNorms (A_norm1_ , max_diag_);
90+ data_.setNorms (M_norm1_ , max_diag_);
9191}
9292
9393void Factorise::permute (const std::vector<Int>& iperm) {
94- // Symmetric permutation of the lower triangular matrix A based on inverse
94+ // Symmetric permutation of the lower triangular matrix M based on inverse
9595 // permutation iperm.
9696 // The resulting matrix is lower triangular, regardless of the input matrix.
9797
@@ -103,8 +103,8 @@ void Factorise::permute(const std::vector<Int>& iperm) {
103103 const Int col = iperm[j];
104104
105105 // go through elements of column
106- for (Int el = ptrA_ [j]; el < ptrA_ [j + 1 ]; ++el) {
107- const Int i = rowsA_ [el];
106+ for (Int el = ptrM_ [j]; el < ptrM_ [j + 1 ]; ++el) {
107+ const Int i = rowsM_ [el];
108108
109109 // ignore potential entries in upper triangular part
110110 if (i < j) continue ;
@@ -133,8 +133,8 @@ void Factorise::permute(const std::vector<Int>& iperm) {
133133 const Int col = iperm[j];
134134
135135 // go through elements of column
136- for (Int el = ptrA_ [j]; el < ptrA_ [j + 1 ]; ++el) {
137- const Int i = rowsA_ [el];
136+ for (Int el = ptrM_ [j]; el < ptrM_ [j + 1 ]; ++el) {
137+ const Int i = rowsM_ [el];
138138
139139 // ignore potential entries in upper triangular part
140140 if (i < j) continue ;
@@ -148,13 +148,13 @@ void Factorise::permute(const std::vector<Int>& iperm) {
148148
149149 Int pos = work[actual_col]++;
150150 new_rows[pos] = actual_row;
151- new_val[pos] = valA_ [el];
151+ new_val[pos] = valM_ [el];
152152 }
153153 }
154154
155- ptrA_ = std::move (new_ptr);
156- rowsA_ = std::move (new_rows);
157- valA_ = std::move (new_val);
155+ ptrM_ = std::move (new_ptr);
156+ rowsM_ = std::move (new_rows);
157+ valM_ = std::move (new_val);
158158}
159159
160160class TaskGroupSpecial : public highs ::parallel::TaskGroup {
@@ -232,7 +232,7 @@ void Factorise::processSupernode(Int sn) {
232232 HIPO_CLOCK_STOP (2 , data_, kTimeFactorisePrepare );
233233
234234 // ===================================================
235- // Assemble original matrix A into frontal
235+ // Assemble original matrix M into frontal
236236 // ===================================================
237237 HIPO_CLOCK_START (2 );
238238 // j is relative column index in the frontal matrix
@@ -241,11 +241,11 @@ void Factorise::processSupernode(Int sn) {
241241 const Int col = sn_begin + j;
242242
243243 // go through the column
244- for (Int el = ptrA_ [col]; el < ptrA_ [col + 1 ]; ++el) {
244+ for (Int el = ptrM_ [col]; el < ptrM_ [col + 1 ]; ++el) {
245245 // relative row index in the frontal matrix
246246 const Int i = S_.relindCols (el);
247247
248- FH->assembleFrontal (i, j, valA_ [el]);
248+ FH->assembleFrontal (i, j, valM_ [el]);
249249 }
250250 }
251251 HIPO_CLOCK_STOP (2 , data_, kTimeFactoriseAssembleOriginal );
@@ -343,7 +343,7 @@ void Factorise::processSupernode(Int sn) {
343343 HIPO_CLOCK_START (2 );
344344 // threshold for regularisation
345345 // const double reg_thresh = max_diag_ * kDynamicDiagCoeff;
346- const double reg_thresh = A_norm1_ * kDynamicDiagCoeff ;
346+ const double reg_thresh = M_norm1_ * kDynamicDiagCoeff ;
347347
348348 if (Int flag = FH->denseFactorise (reg_thresh)) {
349349 flag_stop_ = true ;
0 commit comments