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

Method applyColScale

highs/util/HighsSparseMatrix.cpp:965–980  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

963}
964
965void HighsSparseMatrix::applyColScale(const HighsScale& scale) {
966 assert(this->formatOk());
967 if (this->isColwise()) {
968 for (HighsInt iCol = 0; iCol < this->num_col_; iCol++) {
969 for (HighsInt iEl = this->start_[iCol]; iEl < this->start_[iCol + 1];
970 iEl++)
971 this->value_[iEl] *= scale.col[iCol];
972 }
973 } else {
974 for (HighsInt iRow = 0; iRow < this->num_row_; iRow++) {
975 for (HighsInt iEl = this->start_[iRow]; iEl < this->start_[iRow + 1];
976 iEl++)
977 this->value_[iEl] *= scale.col[this->index_[iEl]];
978 }
979 }
980}
981
982void HighsSparseMatrix::applyRowScale(const HighsScale& scale) {
983 assert(this->formatOk());

Callers 1

addRowsInterfaceMethod · 0.80

Calls 2

formatOkMethod · 0.95
isColwiseMethod · 0.95

Tested by

no test coverage detected