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

Method equivalent

highs/util/HighsSparseMatrix.cpp:39–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39bool 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
53void HighsSparseMatrix::clear() {
54 this->num_col_ = 0;

Callers

nothing calls this directly

Calls 3

isColwiseMethod · 0.95
ensureColwiseMethod · 0.45
ensureRowwiseMethod · 0.45

Tested by

no test coverage detected