public double normFrobenius() { return this.internalMatrix.norm( no.uib.cipr.matrix.Matrix.Norm.Frobenius); }
public double normFrobenius() { return this.internalMatrix.norm( no.uib.cipr.matrix.Matrix.Norm.Frobenius); }
public double normFrobenius() { return this.internalMatrix.norm( no.uib.cipr.matrix.Matrix.Norm.Frobenius); }
throw new IllegalArgumentException("!A.isSquare()"); double anorm = A.norm(norm);
throw new IllegalArgumentException("!A.isSquare()"); double anorm = A.norm(norm);
/** * Computes the reciprocal condition number, using either the infinity norm * of the 1 norm. * * @param A * The matrix this is a decomposition of * @param norm * Either <code>Norm.One</code> or <code>Norm.Infinity</code> * @return The reciprocal condition number. Values close to unity indicate a * well-conditioned system, while numbers close to zero do not. */ public double rcond(Matrix A, Norm norm) { if (norm != Norm.One && norm != Norm.Infinity) throw new IllegalArgumentException( "Only the 1 or the Infinity norms are supported"); double anorm = A.norm(norm); int n = A.numRows(); intW info = new intW(0); doubleW rcond = new doubleW(0); LAPACK.getInstance().dgecon(norm.netlib(), n, LU.getData(), Matrices.ld(n), anorm, rcond, new double[4 * n], new int[n], info); if (info.val < 0) throw new IllegalArgumentException(); return rcond.val; }
/** * Computes the reciprocal condition number, using either the infinity norm * of the 1 norm. * * @param A * The matrix this is a decomposition of * @param norm * Either <code>Norm.One</code> or <code>Norm.Infinity</code> * @return The reciprocal condition number. Values close to unity indicate a * well-conditioned system, while numbers close to zero do not. */ public double rcond(Matrix A, Norm norm) { if (norm != Norm.One && norm != Norm.Infinity) throw new IllegalArgumentException( "Only the 1 or the Infinity norms are supported"); double anorm = A.norm(norm); int n = A.numRows(); intW info = new intW(0); doubleW rcond = new doubleW(0); LAPACK.getInstance().dgecon(norm.netlib(), n, LU.getData(), Matrices.ld(n), anorm, rcond, new double[4 * n], new int[n], info); if (info.val < 0) throw new IllegalArgumentException(); return rcond.val; }
/** * Computes the reciprocal condition number * * @param A * The matrix this is a decomposition of * @return The reciprocal condition number. Values close to unity indicate a * well-conditioned system, while numbers close to zero do not. */ public double rcond(Matrix A) { if (A.numRows() != n) throw new IllegalArgumentException("A.numRows() != n"); if (!A.isSquare()) throw new IllegalArgumentException("!A.isSquare()"); double anorm = A.norm(Norm.One); double[] work = new double[3 * n]; int[] iwork = new int[n]; intW info = new intW(0); doubleW rcond = new doubleW(0); if (upper) LAPACK.getInstance().dppcon(UpLo.Upper.netlib(), n, Cu.getData(), anorm, rcond, work, iwork, info); else LAPACK.getInstance().dppcon(UpLo.Lower.netlib(), n, Cl.getData(), anorm, rcond, work, iwork, info); if (info.val < 0) throw new IllegalArgumentException(); return rcond.val; }
/** * Computes the reciprocal condition number * * @param A * The matrix this is a decomposition of * @return The reciprocal condition number. Values close to unity indicate a * well-conditioned system, while numbers close to zero do not. */ public double rcond(Matrix A) { if (A.numRows() != n) throw new IllegalArgumentException("A.numRows() != n"); if (!A.isSquare()) throw new IllegalArgumentException("!A.isSquare()"); double anorm = A.norm(Norm.One); double[] work = new double[3 * n]; int[] iwork = new int[n]; intW info = new intW(0); doubleW rcond = new doubleW(0); if (upper) LAPACK.getInstance().dppcon(UpLo.Upper.netlib(), n, Cu.getData(), anorm, rcond, work, iwork, info); else LAPACK.getInstance().dppcon(UpLo.Lower.netlib(), n, Cl.getData(), anorm, rcond, work, iwork, info); if (info.val < 0) throw new IllegalArgumentException(); return rcond.val; }
/** * Computes the reciprocal condition number * * @param A * The matrix this is a decomposition of * @return The reciprocal condition number. Values close to unity indicate a * well-conditioned system, while numbers close to zero do not. */ public double rcond(Matrix A) { if (A.numRows() != n) throw new IllegalArgumentException("A.numRows() != n"); if (!A.isSquare()) throw new IllegalArgumentException("!A.isSquare()"); double anorm = A.norm(Norm.One); double[] work = new double[3 * n]; int[] lwork = new int[n]; intW info = new intW(0); doubleW rcond = new doubleW(0); if (upper) LAPACK.getInstance().dpbcon(UpLo.Upper.netlib(), n, kd, Cu.getData(), Matrices.ld(kd + 1), anorm, rcond, work, lwork, info); else LAPACK.getInstance().dpbcon(UpLo.Lower.netlib(), n, kd, Cl.getData(), Matrices.ld(kd + 1), anorm, rcond, work, lwork, info); if (info.val < 0) throw new IllegalArgumentException(); return rcond.val; }
/** * Computes the reciprocal condition number * * @param A * The matrix this is a decomposition of * @return The reciprocal condition number. Values close to unity indicate a * well-conditioned system, while numbers close to zero do not. */ public double rcond(Matrix A) { if (n != A.numRows()) throw new IllegalArgumentException("n != A.numRows()"); if (!A.isSquare()) throw new IllegalArgumentException("!A.isSquare()"); double anorm = A.norm(Norm.One); double[] work = new double[3 * n]; int[] iwork = new int[n]; intW info = new intW(0); doubleW rcond = new doubleW(0); if (upper) LAPACK.getInstance().dpocon(UpLo.Upper.netlib(), n, Cu.getData(), Matrices.ld(n), anorm, rcond, work, iwork, info); else LAPACK.getInstance().dpocon(UpLo.Lower.netlib(), n, Cl.getData(), Matrices.ld(n), anorm, rcond, work, iwork, info); if (info.val < 0) throw new IllegalArgumentException(); return rcond.val; }
/** * Computes the reciprocal condition number * * @param A * The matrix this is a decomposition of * @return The reciprocal condition number. Values close to unity indicate a * well-conditioned system, while numbers close to zero do not. */ public double rcond(Matrix A) { if (A.numRows() != n) throw new IllegalArgumentException("A.numRows() != n"); if (!A.isSquare()) throw new IllegalArgumentException("!A.isSquare()"); double anorm = A.norm(Norm.One); double[] work = new double[3 * n]; int[] lwork = new int[n]; intW info = new intW(0); doubleW rcond = new doubleW(0); if (upper) LAPACK.getInstance().dpbcon(UpLo.Upper.netlib(), n, kd, Cu.getData(), Matrices.ld(kd + 1), anorm, rcond, work, lwork, info); else LAPACK.getInstance().dpbcon(UpLo.Lower.netlib(), n, kd, Cl.getData(), Matrices.ld(kd + 1), anorm, rcond, work, lwork, info); if (info.val < 0) throw new IllegalArgumentException(); return rcond.val; }
/** * Computes the reciprocal condition number * * @param A * The matrix this is a decomposition of * @return The reciprocal condition number. Values close to unity indicate a * well-conditioned system, while numbers close to zero do not. */ public double rcond(Matrix A) { if (n != A.numRows()) throw new IllegalArgumentException("n != A.numRows()"); if (!A.isSquare()) throw new IllegalArgumentException("!A.isSquare()"); double anorm = A.norm(Norm.One); double[] work = new double[3 * n]; int[] iwork = new int[n]; intW info = new intW(0); doubleW rcond = new doubleW(0); if (upper) LAPACK.getInstance().dpocon(UpLo.Upper.netlib(), n, Cu.getData(), Matrices.ld(n), anorm, rcond, work, iwork, info); else LAPACK.getInstance().dpocon(UpLo.Lower.netlib(), n, Cl.getData(), Matrices.ld(n), anorm, rcond, work, iwork, info); if (info.val < 0) throw new IllegalArgumentException(); return rcond.val; }