@Override public void dgetrf(int M, int N, double[] A, int lda, int[] IPIV, int INFO) { LAPACK.getInstance().dgetrf(M,N,A,lda,IPIV,new intW(INFO)); }
public static DoubleMatrix blasInvert(DoubleMatrix myPrecision) { double[] b = new double[myPrecision.columns]; int[] p = new int[myPrecision.columns]; intW info = new intW(0); int m = myPrecision.columns; double [] a = myPrecision.toArray(); //LAPACK.getInstance().dgetri(m, a, m, p, b, -1, info); //log.info(m + " supposedly has optimal work of " + b[0]); //b = new double[(int)b[0]]; LAPACK.getInstance().dgetrf(m, m, a, m, p, info); if (info.val != 0) throw new IllegalArgumentException(); LAPACK.getInstance().dgetri(m, a, m, p, b, b.length, info); if (info.val != 0) throw new IllegalArgumentException(); DoubleMatrix pInv = new DoubleMatrix(a); return pInv.reshape(myPrecision.rows, myPrecision.columns); }
LAPACK.getInstance().dgetrf(m, m, a, m, p, info); if (info.val != 0) throw new IllegalArgumentException();
/** * Creates an LU decomposition of the given matrix * * @param A * Matrix to decompose. Overwritten with the decomposition * @return The current decomposition */ public DenseLU factor(DenseMatrix A) { singular = false; intW info = new intW(0); LAPACK.getInstance().dgetrf(A.numRows(), A.numColumns(), A.getData(), Matrices.ld(A.numRows()), piv, info); if (info.val > 0) singular = true; else if (info.val < 0) throw new IllegalArgumentException(); LU.set(A); return this; }
/** * Creates an LU decomposition of the given matrix * * @param A * Matrix to decompose. Overwritten with the decomposition * @return The current decomposition */ public DenseLU factor(DenseMatrix A) { singular = false; intW info = new intW(0); LAPACK.getInstance().dgetrf(A.numRows(), A.numColumns(), A.getData(), Matrices.ld(A.numRows()), piv, info); if (info.val > 0) singular = true; else if (info.val < 0) throw new IllegalArgumentException(); LU.set(A); return this; }
com.github.fommil.netlib.LAPACK.getInstance().dgetrf(m, n, A, 0, lda, ipiv, 0, info); if (info.val < 0)
com.github.fommil.netlib.LAPACK.getInstance().dgetrf(m, n, A, 0, lda, ipiv, 0, info); if (info.val < 0)
com.github.fommil.netlib.LAPACK.getInstance().dgetrf(m, n, A, 0, lda, ipiv, 0, info); if (info.val < 0)