@@ -34,7 +34,7 @@ class ChebyshevIterationTest {
3434 private static final double M2_B1 = 10.0 ;
3535 private static final double M2_B2 = -4.0 ;
3636 private static final double M2_B3 = 24.0 ;
37- private static final double [] M2_B = {M2_B1 , M2_B2 , M2_B3 };
37+ private static final double [] M2_B = {M1_B1 , M2_B2 , M2_B3 };
3838 private static final double [] M2_X0 = {0.0 , 0.0 , 0.0 };
3939 private static final double M2_E1 = 2.0 ;
4040 private static final double M2_E2 = -2.0 ;
@@ -82,16 +82,16 @@ void testSolve3x3System() {
8282
8383 @ Test
8484 void testAlreadyConverged () {
85-
85+ // Test case where the initial guess is already the solution
8686 double [] solution = ChebyshevIteration .solve (M1_A , M1_B , M1_EXPECTED , M3_LAMBDA_MIN , M3_LAMBDA_MAX , MAX_ITERATIONS , TOLERANCE );
8787 assertArrayEquals (M1_EXPECTED , solution , ASSERT_TOLERANCE );
8888 }
8989
9090 @ Test
9191 void testInvalidEigenvalues () {
92-
92+ // lambdaMin >= lambdaMax
9393 assertThrows (IllegalArgumentException .class , () -> { ChebyshevIteration .solve (M4_A , M4_B , M4_X0 , VAL_2_0 , VAL_1_0 , TEST_ITERATIONS , TEST_TOLERANCE ); });
94-
94+ // lambdaMin <= 0
9595 assertThrows (IllegalArgumentException .class , () -> { ChebyshevIteration .solve (M4_A , M4_B , M4_X0 , VAL_0_0 , VAL_2_0 , TEST_ITERATIONS , TEST_TOLERANCE ); });
9696 }
9797
0 commit comments