@Test public void testSolveMatrix() { System.out.println("naive matrix"); Matrix naive = new Matrix(A); double[] result = new double[3]; BiconjugateGradient biconj = new BiconjugateGradient(); biconj.solve(naive, b, result); assertEquals(result.length, x.length); for (int i = 0; i < x.length; i++) { assertEquals(x[i], result[i], 1E-7); } }
public static double solve(DMatrix A, double[] b, double[] x) { return solve(A, b, x, Jacobi(A), 1E-6, 1, 2 * Math.max(A.nrows(), A.ncols())); }
BiconjugateGradient { public static double solve(DMatrix A, double[] b, double[] x) { return solve(A, b, x, Jacobi(A), 1E-6, 1, 2 * Math.max(A.nrows(), A.ncols())); } }
BiconjugateGradient { public static double solve(DMatrix A, double[] b, double[] x) { return solve(A, b, x, Jacobi(A), 1E-6, 1, 2 * Math.max(A.nrows(), A.ncols())); }  }
BiconjugateGradient { public static double solve(DMatrix A, double[] b, double[] x) { return solve(A, b, x, Jacobi(A), 1E-6, 1, 2 * Math.max(A.nrows(), A.ncols())); }  static Preconditioner Jacobi(DMatrix A); static double solve(DMatrix A, double[] b, double[] x); static double solve(DMatrix A, double[] b, double[] x, Preconditioner preconditioner, double tol, int itol, int maxIter); }
BiconjugateGradient { public static double solve(DMatrix A, double[] b, double[] x) { return solve(A, b, x, Jacobi(A), 1E-6, 1, 2 * Math.max(A.nrows(), A.ncols())); }  static Preconditioner Jacobi(DMatrix A); static double solve(DMatrix A, double[] b, double[] x); static double solve(DMatrix A, double[] b, double[] x, Preconditioner preconditioner, double tol, int itol, int maxIter);  }