| 382 | } |
| 383 | |
| 384 | void getDependentCols(const HighsSparseMatrix& matrix, |
| 385 | std::vector<HighsInt>& col_set, |
| 386 | std::vector<HighsInt>& dependent_col_set, |
| 387 | const HighsInt required_rank_deficiency) { |
| 388 | HFactor factor; |
| 389 | factor.setup(matrix, col_set); |
| 390 | HighsInt rank_deficiency = factor.build(); |
| 391 | REQUIRE(rank_deficiency == required_rank_deficiency); |
| 392 | if (dev_run) |
| 393 | printf("Returned rank_deficiency = %d:\n No pivot in\nk Row Col Var\n", |
| 394 | (int)rank_deficiency); |
| 395 | dependent_col_set.clear(); |
| 396 | for (HighsInt k = 0; k < rank_deficiency; k++) { |
| 397 | if (dev_run) |
| 398 | printf("%1d %3d %3d %3d\n", (int)k, (int)factor.row_with_no_pivot[k], |
| 399 | (int)factor.col_with_no_pivot[k], |
| 400 | (int)factor.var_with_no_pivot[k]); |
| 401 | dependent_col_set.push_back(factor.var_with_no_pivot[k]); |
| 402 | } |
| 403 | } |
| 404 | |
| 405 | void reportDependentCols(const std::vector<HighsInt>& dependent_col_set) { |
| 406 | printf("Dependent column(s) in col_set:"); |
no test coverage detected