| 62 | } |
| 63 | |
| 64 | void HighsSparseMatrix::exactResize() { |
| 65 | if (this->isColwise()) { |
| 66 | this->start_.resize(this->num_col_ + 1); |
| 67 | } else { |
| 68 | this->start_.resize(this->num_row_ + 1); |
| 69 | } |
| 70 | const HighsInt num_nz = this->isColwise() ? this->start_[this->num_col_] |
| 71 | : this->start_[this->num_row_]; |
| 72 | if (this->format_ == MatrixFormat::kRowwisePartitioned) { |
| 73 | this->p_end_.resize(this->num_row_); |
| 74 | } else { |
| 75 | assert((int)this->p_end_.size() == 0); |
| 76 | this->p_end_.clear(); |
| 77 | } |
| 78 | this->index_.resize(num_nz); |
| 79 | this->value_.resize(num_nz); |
| 80 | } |
| 81 | |
| 82 | bool HighsSparseMatrix::isRowwise() const { |
| 83 | return this->format_ == MatrixFormat::kRowwise || |