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

Method applyRowScale

highs/util/HighsSparseMatrix.cpp:982–997  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

980}
981
982void HighsSparseMatrix::applyRowScale(const HighsScale& scale) {
983 assert(this->formatOk());
984 if (this->isColwise()) {
985 for (HighsInt iCol = 0; iCol < this->num_col_; iCol++) {
986 for (HighsInt iEl = this->start_[iCol]; iEl < this->start_[iCol + 1];
987 iEl++)
988 this->value_[iEl] *= scale.row[this->index_[iEl]];
989 }
990 } else {
991 for (HighsInt iRow = 0; iRow < this->num_row_; iRow++) {
992 for (HighsInt iEl = this->start_[iRow]; iEl < this->start_[iRow + 1];
993 iEl++)
994 this->value_[iEl] *= scale.row[iRow];
995 }
996 }
997}
998
999void HighsSparseMatrix::unapplyScale(const HighsScale& scale) {
1000 assert(this->formatOk());

Callers 1

addColsInterfaceMethod · 0.80

Calls 2

formatOkMethod · 0.95
isColwiseMethod · 0.95

Tested by

no test coverage detected