MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / priceByColumn

Method priceByColumn

highs/util/HighsSparseMatrix.cpp:1412–1437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1410}
1411
1412void 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
1439void HighsSparseMatrix::priceByRow(const bool quad_precision, HVector& result,
1440 const HVector& column,

Callers 5

tableauRowPriceMethod · 0.80
fullPriceMethod · 0.80
chooseColumnSliceMethod · 0.80

Calls 1

isColwiseMethod · 0.95

Tested by

no test coverage detected