MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / getDependentCols

Function getDependentCols

check/TestAlienBasis.cpp:384–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382}
383
384void 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
405void reportDependentCols(const std::vector<HighsInt>& dependent_col_set) {
406 printf("Dependent column(s) in col_set:");

Callers 1

TestAlienBasis.cppFile · 0.85

Calls 4

push_backMethod · 0.80
setupMethod · 0.45
buildMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected