| 1218 | } |
| 1219 | |
| 1220 | void HighsSparseMatrix::productQuad(vector<double>& result, |
| 1221 | const vector<double>& row, |
| 1222 | const HighsInt debug_report) const { |
| 1223 | assert(this->formatOk()); |
| 1224 | assert((int)row.size() >= this->num_col_); |
| 1225 | result.assign(this->num_row_, 0.0); |
| 1226 | if (this->isColwise()) { |
| 1227 | std::vector<HighsCDouble> value(this->num_row_, 0); |
| 1228 | for (HighsInt iCol = 0; iCol < this->num_col_; iCol++) { |
| 1229 | for (HighsInt iEl = this->start_[iCol]; iEl < this->start_[iCol + 1]; |
| 1230 | iEl++) |
| 1231 | value[this->index_[iEl]] += row[iCol] * this->value_[iEl]; |
| 1232 | } |
| 1233 | for (HighsInt iRow = 0; iRow < this->num_row_; iRow++) |
| 1234 | result[iRow] = double(value[iRow]); |
| 1235 | } else { |
| 1236 | for (HighsInt iRow = 0; iRow < this->num_row_; iRow++) { |
| 1237 | HighsCDouble value = 0.0; |
| 1238 | for (HighsInt iEl = this->start_[iRow]; iEl < this->start_[iRow + 1]; |
| 1239 | iEl++) |
| 1240 | value += row[this->index_[iEl]] * this->value_[iEl]; |
| 1241 | result[iRow] = double(value); |
| 1242 | } |
| 1243 | } |
| 1244 | } |
| 1245 | |
| 1246 | void HighsSparseMatrix::productTransposeQuad( |
| 1247 | vector<double>& result, const vector<double>& row, |
no test coverage detected