| 130 | } |
| 131 | |
| 132 | HighsCDouble HighsLp::objectiveCDoubleValue( |
| 133 | const std::vector<double>& solution) const { |
| 134 | assert((int)solution.size() >= this->num_col_); |
| 135 | HighsCDouble objective_function_value = this->offset_; |
| 136 | for (HighsInt iCol = 0; iCol < this->num_col_; iCol++) |
| 137 | objective_function_value += |
| 138 | static_cast<HighsCDouble>(this->col_cost_[iCol]) * solution[iCol]; |
| 139 | return objective_function_value; |
| 140 | } |
| 141 | |
| 142 | void HighsLp::setMatrixDimensions() { |
| 143 | this->a_matrix_.num_col_ = this->num_col_; |
no test coverage detected