| 37 | } |
| 38 | |
| 39 | bool HighsSparseMatrix::equivalent(const HighsSparseMatrix& matrix) const { |
| 40 | // Use this to test when the matrices may be in opposite format |
| 41 | if (*this == matrix) return true; |
| 42 | // Creat a local copy in of matrix in the same format as this and |
| 43 | // test for it being equal to this |
| 44 | HighsSparseMatrix lc_matrix = matrix; |
| 45 | if (this->isColwise()) { |
| 46 | lc_matrix.ensureColwise(); |
| 47 | } else { |
| 48 | lc_matrix.ensureRowwise(); |
| 49 | } |
| 50 | return *this == lc_matrix; |
| 51 | } |
| 52 | |
| 53 | void HighsSparseMatrix::clear() { |
| 54 | this->num_col_ = 0; |
nothing calls this directly
no test coverage detected