| 1637 | } |
| 1638 | |
| 1639 | void HighsSparseMatrix::priceByRowDenseResult( |
| 1640 | std::vector<double>& result, const HVector& column, |
| 1641 | const HighsInt from_index, const HighsInt debug_report) const { |
| 1642 | // Assumes that result is zeroed beforehand - in case continuing |
| 1643 | // priceByRow after switch from sparse |
| 1644 | assert(this->isRowwise()); |
| 1645 | for (HighsInt ix = from_index; ix < column.count; ix++) { |
| 1646 | HighsInt iRow = column.index[ix]; |
| 1647 | double multiplier = column.array[iRow]; |
| 1648 | // Determine whether p_end_ or the next start_ should be used to end the |
| 1649 | // loop |
| 1650 | HighsInt to_iEl; |
| 1651 | if (this->format_ == MatrixFormat::kRowwisePartitioned) { |
| 1652 | to_iEl = this->p_end_[iRow]; |
| 1653 | } else { |
| 1654 | to_iEl = this->start_[iRow + 1]; |
| 1655 | } |
| 1656 | if (debug_report == kDebugReportAll || debug_report == iRow) |
| 1657 | debugReportRowPrice(iRow, multiplier, to_iEl, result); |
| 1658 | for (HighsInt iEl = this->start_[iRow]; iEl < to_iEl; iEl++) { |
| 1659 | HighsInt iCol = this->index_[iEl]; |
| 1660 | double value0 = result[iCol]; |
| 1661 | double value1 = value0 + multiplier * this->value_[iEl]; |
| 1662 | result[iCol] = (fabs(value1) < kHighsTiny) ? kHighsZero : value1; |
| 1663 | } |
| 1664 | } |
| 1665 | } |
| 1666 | |
| 1667 | void HighsSparseMatrix::priceByRowDenseResult( |
| 1668 | std::vector<HighsCDouble>& result, const HVector& column, |
no test coverage detected