Exemplo n.º 1
0
 public static void ormqr(char side, char trans, FloatMatrix A, FloatMatrix tau, FloatMatrix C) {
   int k = tau.length;
   int info =
       NativeBlas.sormqr(
           side, trans, C.rows, C.columns, k, A.data, 0, A.rows, tau.data, 0, C.data, 0, C.rows);
   checkInfo("ORMQR", info);
 }
Exemplo n.º 2
0
  public static int syevr(
      char jobz,
      char range,
      char uplo,
      FloatMatrix a,
      float vl,
      float vu,
      int il,
      int iu,
      float abstol,
      FloatMatrix w,
      FloatMatrix z,
      int[] isuppz) {
    int n = a.rows;
    int[] m = new int[1];

    int info =
        NativeBlas.ssyevr(
            jobz, range, uplo, n, a.data, 0, a.rows, vl, vu, il, iu, abstol, m, 0, w.data, 0,
            z.data, 0, z.rows, isuppz, 0);

    checkInfo("SYEVR", info);

    return info;
  }
Exemplo n.º 3
0
 public static void posv(char uplo, FloatMatrix A, FloatMatrix B) {
   int n = A.rows;
   int nrhs = B.columns;
   int info = NativeBlas.sposv(uplo, n, nrhs, A.data, 0, A.rows, B.data, 0, B.rows);
   checkInfo("DPOSV", info);
   if (info > 0)
     throw new LapackArgumentException(
         "DPOSV", "Leading minor of order i of A is not positive definite.");
 }
Exemplo n.º 4
0
  /** ************************************************************************* LAPACK */
  public static FloatMatrix gesv(FloatMatrix a, int[] ipiv, FloatMatrix b) {
    int info = NativeBlas.sgesv(a.rows, b.columns, a.data, 0, a.rows, ipiv, 0, b.data, 0, b.rows);
    checkInfo("DGESV", info);

    if (info > 0)
      throw new LapackException(
          "DGESV", "Linear equation cannot be solved because the matrix was singular.");

    return b;
  }
Exemplo n.º 5
0
  public static FloatMatrix sysv(char uplo, FloatMatrix a, int[] ipiv, FloatMatrix b) {
    int info =
        NativeBlas.ssysv(uplo, a.rows, b.columns, a.data, 0, a.rows, ipiv, 0, b.data, 0, b.rows);
    checkInfo("SYSV", info);

    if (info > 0)
      throw new LapackSingularityException(
          "SYV", "Linear equation cannot be solved because the matrix was singular.");

    return b;
  }
Exemplo n.º 6
0
 public static void geqrf(FloatMatrix A, FloatMatrix tau) {
   int info = NativeBlas.sgeqrf(A.rows, A.columns, A.data, 0, A.rows, tau.data, 0);
   checkInfo("GEQRF", info);
 }