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

Method productTranspose

highs/util/HighsSparseMatrix.cpp:1200–1218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1198}
1199
1200void HighsSparseMatrix::productTranspose(vector<double>& result,
1201 const vector<double>& col) const {
1202 assert(this->formatOk());
1203 assert((int)col.size() >= this->num_row_);
1204 result.assign(this->num_col_, 0.0);
1205 if (this->isColwise()) {
1206 for (HighsInt iCol = 0; iCol < this->num_col_; iCol++) {
1207 for (HighsInt iEl = this->start_[iCol]; iEl < this->start_[iCol + 1];
1208 iEl++)
1209 result[iCol] += col[this->index_[iEl]] * this->value_[iEl];
1210 }
1211 } else {
1212 for (HighsInt iRow = 0; iRow < this->num_row_; iRow++) {
1213 for (HighsInt iEl = this->start_[iRow]; iEl < this->start_[iRow + 1];
1214 iEl++)
1215 result[this->index_[iEl]] += col[iRow] * this->value_[iEl];
1216 }
1217 }
1218}
1219
1220void HighsSparseMatrix::productQuad(vector<double>& result,
1221 const vector<double>& row,

Callers 2

powerMethodMethod · 0.80

Calls 3

formatOkMethod · 0.95
isColwiseMethod · 0.95
sizeMethod · 0.45

Tested by

no test coverage detected