| 272 | } |
| 273 | |
| 274 | void HighsLp::unapplyScale() { |
| 275 | // Ensure that any scaling is not applied |
| 276 | const HighsScale& scale = this->scale_; |
| 277 | if (!this->is_scaled_) { |
| 278 | // Not scaled so return |
| 279 | return; |
| 280 | } |
| 281 | // Already scaled - so check that there is scaling |
| 282 | assert(scale.has_scaling); |
| 283 | // Unapply the scaling to the bounds, costs and matrix, and record |
| 284 | // that it has been unapplied |
| 285 | for (HighsInt iCol = 0; iCol < this->num_col_; iCol++) { |
| 286 | this->col_lower_[iCol] *= scale.col[iCol]; |
| 287 | this->col_upper_[iCol] *= scale.col[iCol]; |
| 288 | this->col_cost_[iCol] /= scale.col[iCol]; |
| 289 | } |
| 290 | for (HighsInt iRow = 0; iRow < this->num_row_; iRow++) { |
| 291 | this->row_lower_[iRow] /= scale.row[iRow]; |
| 292 | this->row_upper_[iRow] /= scale.row[iRow]; |
| 293 | } |
| 294 | this->a_matrix_.unapplyScale(scale); |
| 295 | this->is_scaled_ = false; |
| 296 | } |
| 297 | |
| 298 | void HighsLp::moveBackLpAndUnapplyScaling(HighsLp& lp) { |
| 299 | assert(this->is_moved_ == true); |
no outgoing calls
no test coverage detected