public void When_Solve_ORT() { // Arrange Matrix A = new Matrix(3, 3); A.Elem[0][0] = 2; A.Elem[0][1] = 3; A.Elem[0][2] = -1; A.Elem[1][0] = 1; A.Elem[1][1] = -2; A.Elem[1][2] = 1; A.Elem[2][0] = 1; A.Elem[2][1] = 0; A.Elem[2][2] = 2; Vector F = new Vector(3); F.Elem[0] = 9; F.Elem[1] = 3; F.Elem[2] = 2; // Act Vector gramSchmidtC = GramSchmidt.StartModifiedSolverQR(A, F); Vector gramSchmidtM = GramSchmidt.StartModifiedSolverQR(A, F); Vector givens = Givens.StartSolverQR(A, F); Vector householder = Householder.StartSolverQR(A, F); // Assert Assert.That(A * gramSchmidtC == F); Assert.That(A * gramSchmidtM == F); Assert.That(A * givens == F); Assert.That(A * householder == F); }