| 1410 | } |
| 1411 | |
| 1412 | void HighsSparseMatrix::priceByColumn(const bool quad_precision, |
| 1413 | HVector& result, const HVector& column, |
| 1414 | const HighsInt debug_report) const { |
| 1415 | assert(this->isColwise()); |
| 1416 | if (debug_report >= kDebugReportAll) |
| 1417 | printf("\nHighsSparseMatrix::priceByColumn:\n"); |
| 1418 | result.count = 0; |
| 1419 | for (HighsInt iCol = 0; iCol < this->num_col_; iCol++) { |
| 1420 | double value = 0; |
| 1421 | if (quad_precision) { |
| 1422 | HighsCDouble quad_value = 0.0; |
| 1423 | for (HighsInt iEl = this->start_[iCol]; iEl < this->start_[iCol + 1]; |
| 1424 | iEl++) |
| 1425 | quad_value += column.array[this->index_[iEl]] * this->value_[iEl]; |
| 1426 | value = (double)quad_value; |
| 1427 | } else { |
| 1428 | for (HighsInt iEl = this->start_[iCol]; iEl < this->start_[iCol + 1]; |
| 1429 | iEl++) |
| 1430 | value += column.array[this->index_[iEl]] * this->value_[iEl]; |
| 1431 | } |
| 1432 | if (fabs(value) > kHighsTiny) { |
| 1433 | result.array[iCol] = value; |
| 1434 | result.index[result.count++] = iCol; |
| 1435 | } |
| 1436 | } |
| 1437 | } |
| 1438 | |
| 1439 | void HighsSparseMatrix::priceByRow(const bool quad_precision, HVector& result, |
| 1440 | const HVector& column, |
no test coverage detected