@Test public void testARPACK() { System.out.println("ARPACK"); DenseMatrix a = Matrix.of(A); a.setSymmetric(true); EVD result = ARPACK.eigen(a, 2, ARPACK.Ritz.SA); assertEquals(eigenValues[1], result.getEigenValues()[0], 1E-4); assertEquals(eigenValues[2], result.getEigenValues()[1], 1E-4); for (int i = 0; i < 3; i++) { assertEquals(Math.abs(eigenVectors[i][1]), Math.abs(result.getEigenVectors().get(i, 0)), 1E-4); } for (int i = 0; i < 3; i++) { assertEquals(Math.abs(eigenVectors[i][2]), Math.abs(result.getEigenVectors().get(i, 1)), 1E-4); } }
public static EVD eigen(Matrix A, int k, Ritz ritz) { return eigen(A, k, ritz, 1E-8, 10 * A.nrows()); }
ARPACK { public static EVD eigen(Matrix A, int k, Ritz ritz) { return eigen(A, k, ritz, 1E-8, 10 * A.nrows()); } }
ARPACK { public static EVD eigen(Matrix A, int k, Ritz ritz) { return eigen(A, k, ritz, 1E-8, 10 * A.nrows()); }  }
ARPACK { public static EVD eigen(Matrix A, int k, Ritz ritz) { return eigen(A, k, ritz, 1E-8, 10 * A.nrows()); }  static EVD eigen(Matrix A, int k, Ritz ritz); static EVD eigen(Matrix A, int k, String which); static EVD eigen(Matrix A, int k, Ritz ritz, double kappa, int maxIter); static EVD eigen(Matrix A, int k, String which, double kappa, int maxIter); }
ARPACK { public static EVD eigen(Matrix A, int k, Ritz ritz) { return eigen(A, k, ritz, 1E-8, 10 * A.nrows()); }  static EVD eigen(Matrix A, int k, Ritz ritz); static EVD eigen(Matrix A, int k, String which); static EVD eigen(Matrix A, int k, Ritz ritz, double kappa, int maxIter); static EVD eigen(Matrix A, int k, String which, double kappa, int maxIter);  }