コード例 #1
0
 public static void test_is_almost_zero()
 {
     Console.WriteLine("\nTesting is_almost_zero(Matrix A) ...\n");
     Numeric n = new Numeric();
     List<double[]> list3 = new List<double[]>() { new double[] { 4, 2, 1 }, new double[] { 2, 9, 3 }, new double[] { 1, 3, 16 } };
     Matrix A = Matrix.from_list(list3);
     Matrix L = n.Cholesky(A);
     Console.WriteLine("\n\tA: " + A.ToString());
     Console.WriteLine("\n\tExpect True: is_almost_zero(A - L*L.t) = " + n.is_almost_zero(A - L * L.Transpose()));
 }