aboutsummaryrefslogtreecommitdiff
path: root/tests/test_lu.cpp
diff options
context:
space:
mode:
authory-jan137 <yousefjan24000@gmail.com>2026-03-15 14:08:51 +0300
committery-jan137 <yousefjan24000@gmail.com>2026-03-15 14:08:51 +0300
commit606ad99e8363bd520506ea2e88b831911fe03c18 (patch)
tree47a422beed4a53005d4dfdc7c9dab5aa6325274d /tests/test_lu.cpp
parentbe01607041d2ded41e5bf39a0a8e17ffb9bcc296 (diff)
Add QR iteration algos
Diffstat (limited to 'tests/test_lu.cpp')
-rw-r--r--tests/test_lu.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/test_lu.cpp b/tests/test_lu.cpp
index e54a8a1..dfb76c4 100644
--- a/tests/test_lu.cpp
+++ b/tests/test_lu.cpp
@@ -82,12 +82,11 @@ TEST_CASE("LU factorization: 3x3 known system", "[lu]") {
REQUIRE(lu.U.rows() == 3);
REQUIRE(lu.perm.size() == 3);
- // L must have unit diagonal.
for (std::size_t i = 0; i < 3; ++i) {
CHECK(lu.L(i, i) == Catch::Approx(1.0));
}
- // Reconstruction: ||PA - LU|| must be near zero.
+ // ||PA - LU|| must be near zero.
CHECK(reconstruction_error(A, lu) == Catch::Approx(0.0).margin(1e-12));
}
@@ -102,7 +101,7 @@ TEST_CASE("LU factorization: identity matrix", "[lu]") {
}
TEST_CASE("LU factorization: matrix requiring row swaps", "[lu]") {
- // First column entry is zero — no-pivot LU would immediately fail.
+ // First column entry is zero. No-pivot LU would immediately fail.
const Matrix A{
{0.0, 1.0, 2.0},
{3.0, 4.0, 5.0},