code: public static DoubleMatrix[] symmetricGeneralizedEigenvectors(DoubleMatrix A, DoubleMatrix B, double vl, double vu) {
      A.assertSquare();
      B.assertSquare();
      A.assertSameSize(B);
      if (vu <= vl) {
        throw new IllegalArgumentException("Bound exception: make sure vu > vl");
      }
      double abstol = (double) 1e-9;    // What is a good tolerance?
      int[] m = new int[1];
      DoubleMatrix W = new DoubleMatrix(A.rows);
      DoubleMatrix Z = new DoubleMatrix(A.rows, A.columns);
      SimpleBlas.sygvx(1, 'V', 'V', 'U', A.dup(), B.dup(), vl, vu, 0, 0, abstol, m, W, Z);
      if (m[0] == 0) {
        throw new NoEigenResultException("No eigenvalues found for selected range");
      }
      DoubleMatrix[] result = new DoubleMatrix[2];
      Range r = new IntervalRange(0, m[0]);
      result[0] = Z.get(new IntervalRange(0, A.rows), r);
      result[1] = W.get(r, 0);
      return result;
    }
docs: Computes selected eigenvalues and their corresponding eigenvectors of the real generalized symmetric-definite
  eigenproblem of the form A x = L B x or, equivalently, (A - L B)x = 0. Here A and B are assumed to be symmetric
  and B is also positive definite. The selection is based on the given range of values for the desired eigenvalues.
  
  The range is half open: (vl,vu].
  
  @param A  symmetric Matrix A. Only the upper triangle will be considered.
  @param B  symmetric Matrix B. Only the upper triangle will be considered.
  @param vl lower bound of the smallest eigenvalue to return
  @param vu upper bound of the largest eigenvalue to return
  @return an array of matrices of length two. The first one is an array of the eigenvectors x.
  The second one is a vector containing the corresponding eigenvalues L.
  @throws IllegalArgumentException if <code>vl &gt; vu</code>
  @throws NoEigenResultException   if no eigevalues are found for the selected range: (vl,vu]