| 963 | } |
| 964 | |
| 965 | void 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 | |
| 982 | void HighsSparseMatrix::applyRowScale(const HighsScale& scale) { |
| 983 | assert(this->formatOk()); |
no test coverage detected