// Copyright (2019-2024) Paul Scherrer Institute // Copyright (2019-2024) Paul Scherrer Institute #include #include "../image_analysis/Regression.h" TEST_CASE("Regression") { std::vector x(10); std::vector y(10); for (int i = 0; i < x.size(); i++) { x[i] = i; y[i] = 7 * i + 5; } auto reg = regression(x, y); REQUIRE(reg.intercept == Catch::Approx(5.0)); REQUIRE(reg.slope == Catch::Approx(7.0)); }