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

Method productTransposeQuad

highs/util/HighsSparseMatrix.cpp:1246–1270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1244}
1245
1246void HighsSparseMatrix::productTransposeQuad(
1247 vector<double>& result, const vector<double>& row,
1248 const HighsInt debug_report) const {
1249 assert(this->formatOk());
1250 assert((int)row.size() >= this->num_row_);
1251 result.assign(this->num_col_, 0.0);
1252 if (this->isColwise()) {
1253 for (HighsInt iCol = 0; iCol < this->num_col_; iCol++) {
1254 HighsCDouble value = 0.0;
1255 for (HighsInt iEl = this->start_[iCol]; iEl < this->start_[iCol + 1];
1256 iEl++)
1257 value += row[this->index_[iEl]] * this->value_[iEl];
1258 result[iCol] = double(value);
1259 }
1260 } else {
1261 std::vector<HighsCDouble> value(this->num_col_, 0);
1262 for (HighsInt iRow = 0; iRow < this->num_row_; iRow++) {
1263 for (HighsInt iEl = this->start_[iRow]; iEl < this->start_[iRow + 1];
1264 iEl++)
1265 value[this->index_[iEl]] += row[iRow] * this->value_[iEl];
1266 }
1267 for (HighsInt iCol = 0; iCol < this->num_col_; iCol++)
1268 result[iCol] = double(value[iCol]);
1269 }
1270}
1271
1272void HighsSparseMatrix::productTransposeQuad(
1273 vector<double>& result_value, vector<HighsInt>& result_index,

Callers 5

computeMethod · 0.80
getKktFailuresFunction · 0.80

Calls 8

formatOkMethod · 0.95
isColwiseMethod · 0.95
reserveMethod · 0.80
push_backMethod · 0.80
sizeMethod · 0.45
addMethod · 0.45
cleanupMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected