/** * Returns whether the matrix is nonsingular (has an inverse). * * @return true if <tt>U</tt>, and hence <tt>A</tt>, is nonsingular; false * otherwise. */ public boolean isNonsingular() { return quick.isNonsingular(); }
/** * Constructs and returns the cholesky-decomposition of the given matrix. */ public DenseDoubleCholeskyDecomposition chol(DoubleMatrix2D matrix) { return new DenseDoubleCholeskyDecomposition(matrix); }
/** * Constructs and returns the SingularValue-decomposition of the given * matrix. */ public DenseDoubleSingularValueDecomposition svd(DoubleMatrix2D matrix) { return new DenseDoubleSingularValueDecomposition(matrix, true, true); }
/** * Constructs and returns the Eigenvalue-decomposition of the given matrix. */ public DenseDoubleEigenvalueDecomposition eig(DoubleMatrix2D matrix) { return new DenseDoubleEigenvalueDecomposition(matrix); }
/** * Returns the lower triangular factor, <tt>L</tt>. * * @return <tt>L</tt> */ public DoubleMatrix2D getL() { return quick.getL(); }
/** * Constructs and returns the LU-decomposition of the given matrix. */ public DenseDoubleLUDecomposition lu(DoubleMatrix2D matrix) { return new DenseDoubleLUDecomposition(matrix); }
/** * Constructs and returns the QR-decomposition of the given matrix. */ public DenseDoubleQRDecomposition qr(DoubleMatrix2D matrix) { return new DenseDoubleQRDecomposition(matrix); }
/** * Returns the upper triangular factor, <tt>U</tt>. * * @return <tt>U</tt> */ public DoubleMatrix2D getU() { return quick.getU(); }
/** * Constructs and returns the Cholesky-decomposition of the given matrix. * * @param matrix * sparse matrix * @param order * ordering option (0 or 1); 0: natural ordering, 1: amd(A+A') * @return Cholesky-decomposition of the given matrix */ public SparseDoubleCholeskyDecomposition chol(DoubleMatrix2D matrix, int order) { return new SparseDoubleCholeskyDecomposition(matrix, order); }
/** * Returns the determinant, <tt>det(A)</tt>. * * @exception IllegalArgumentException * Matrix must be square */ public double det() { return quick.det(); }
/** * Returns pivot permutation vector as a one-dimensional double array * * @return (double) piv */ protected double[] getDoublePivot() { int m = m(); double[] vals = new double[m]; for (int i = 0; i < m; i++) { vals[i] = piv[i]; } return vals; }
/** * Constructs and returns the QR-decomposition of the given matrix. * * @param matrix * sparse matrix * @param order * ordering option (0 to 3); 0: natural ordering, 1: amd(A+A'), * 2: amd(S'*S), 3: amd(A'*A) * @return the QR-decomposition of the given matrix */ public SparseDoubleQRDecomposition qr(DoubleMatrix2D matrix, int order) { return new SparseDoubleQRDecomposition(matrix, order); }
/** * Sets the combined lower and upper triangular factor, <tt>LU</tt>. The * parameter is not checked; make sure it is indeed a proper LU * decomposition. */ public void setLU(DoubleMatrix2D LU) { this.LU = LU; this.isNonSingular = isNonsingular(LU); }
/** * Constructs and returns the cholesky-decomposition of the given matrix. */ public DenseDoubleCholeskyDecomposition chol(DoubleMatrix2D matrix) { return new DenseDoubleCholeskyDecomposition(matrix); }
/** * Constructs and returns the SingularValue-decomposition of the given * matrix. */ public DenseDoubleSingularValueDecomposition svd(DoubleMatrix2D matrix) { return new DenseDoubleSingularValueDecomposition(matrix, true, true); }
/** * Constructs and returns the Eigenvalue-decomposition of the given matrix. */ public DenseDoubleEigenvalueDecomposition eig(DoubleMatrix2D matrix) { return new DenseDoubleEigenvalueDecomposition(matrix); }
/** * Constructs and returns the Cholesky-decomposition of the given matrix. * * @param matrix * sparse matrix * @param order * ordering option (0 or 1); 0: natural ordering, 1: amd(A+A') * @return Cholesky-decomposition of the given matrix */ public SparseDoubleCholeskyDecomposition chol(DoubleMatrix2D matrix, int order) { return new SparseDoubleCholeskyDecomposition(matrix, order); }
/** * Returns the determinant, <tt>det(A)</tt>. * * @exception IllegalArgumentException * Matrix must be square */ public double det() { return quick.det(); }
/** * Returns whether the matrix is nonsingular (has an inverse). * * @return true if <tt>U</tt>, and hence <tt>A</tt>, is nonsingular; false * otherwise. */ public boolean isNonsingular() { return quick.isNonsingular(); }
/** * Sets the combined lower and upper triangular factor, <tt>LU</tt>. The * parameter is not checked; make sure it is indeed a proper LU * decomposition. */ public void setLU(DoubleMatrix2D LU) { this.LU = LU; this.isNonSingular = isNonsingular(LU); }