private DenseMatrix solve(DenseMatrix B, Transpose trans) throws MatrixSingularException { if (singular) throw new MatrixSingularException(); if (B.numRows() != LU.numRows()) throw new IllegalArgumentException("B.numRows() != LU.numRows()"); intW info = new intW(0); LAPACK.getInstance().dgetrs(trans.netlib(), LU.numRows(), B.numColumns(), LU.getData(), Matrices.ld(LU.numRows()), piv, B.getData(), Matrices.ld(LU.numRows()), info); if (info.val < 0) throw new IllegalArgumentException(); return B; }
private DenseMatrix solve(DenseMatrix B, Transpose trans) throws MatrixSingularException { if (singular) throw new MatrixSingularException(); if (B.numRows() != LU.numRows()) throw new IllegalArgumentException("B.numRows() != LU.numRows()"); intW info = new intW(0); LAPACK.getInstance().dgetrs(trans.netlib(), LU.numRows(), B.numColumns(), LU.getData(), Matrices.ld(LU.numRows()), piv, B.getData(), Matrices.ld(LU.numRows()), info); if (info.val < 0) throw new IllegalArgumentException(); return B; }