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

Function infNormDiffOk

check/TestHighsSparseMatrix.cpp:9–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8const bool dev_run = false;
9bool infNormDiffOk(const std::vector<double> x0, const std::vector<double> x1) {
10 assert(x1.size() >= x0.size());
11 double norm_diff = 0;
12 for (HighsInt ix = 0; ix < HighsInt(x0.size()); ix++)
13 norm_diff = std::max(std::abs(x0[ix] - x1[ix]), norm_diff);
14 return norm_diff < 1e-12;
15}
16
17// No commas in test case name.
18TEST_CASE("Sparse-matrix-products", "[highs_sparse_matrix]") {

Callers 1

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected