Ejemplo n.º 1
0
 public static int sygvx(
     int itype,
     char jobz,
     char range,
     char uplo,
     FloatMatrix A,
     FloatMatrix B,
     float vl,
     float vu,
     int il,
     int iu,
     float abstol,
     int[] m,
     FloatMatrix W,
     FloatMatrix Z) {
   int[] iwork = new int[1];
   int[] ifail = new int[1];
   int info =
       NativeBlas.ssygvx(
           itype, jobz, range, uplo, A.rows, A.data, 0, A.rows, B.data, 0, B.rows, vl, vu, il, iu,
           abstol, m, 0, W.data, 0, Z.data, 0, Z.rows, iwork, 0, ifail, 0);
   if (info == 0) {
     return 0;
   } else {
     if (info < 0) {
       throw new LapackArgumentException("DSYGVX", -info);
     }
     if (info <= A.rows) {
       throw new LapackConvergenceException("DSYGVX", info + " eigenvectors failed to converge");
     } else {
       throw new LapackException(
           "DSYGVX",
           "The leading minor order " + (info - A.rows) + " of B is not postivie definite.");
     }
   }
 }