/** * {@inheritDoc} * * NOTE: Upon completion this is in the compressed Yale format. * * This is implemented by creating a new dense matrix version of this and * calling its inverse method -- inverting a sparse matrix is likely to * generate a dense matrix anyway. We would recommend using an iterative * solver (like Conjugate Gradient). * * @return {@inheritDoc} */ @Override final public Matrix inverse() { if (!isCompressed()) { compress(); } // NOTE: Inverting a sparse matrix generally creates a dense matrix // anyway. Sparse matrices make the most sense for iterative solvers return (new DenseMatrix(this)).inverse(); }
/** * {@inheritDoc} * * NOTE: Upon completion this is in the compressed Yale format. * * This is implemented by creating a new dense matrix version of this and * calling its inverse method -- inverting a sparse matrix is likely to * generate a dense matrix anyway. We would recommend using an iterative * solver (like Conjugate Gradient). * * @return {@inheritDoc} */ @Override final public Matrix inverse() { if (!isCompressed()) { compress(); } // NOTE: Inverting a sparse matrix generally creates a dense matrix // anyway. Sparse matrices make the most sense for iterative solvers return (new DenseMatrix(this)).inverse(); }
/** * {@inheritDoc} * * NOTE: Upon completion this is in the compressed Yale format. * * This is implemented by creating a new dense matrix version of this and * calling its inverse method -- inverting a sparse matrix is likely to * generate a dense matrix anyway. We would recommend using an iterative * solver (like Conjugate Gradient). * * @return {@inheritDoc} */ @Override final public Matrix inverse() { if (!isCompressed()) { compress(); } // NOTE: Inverting a sparse matrix generally creates a dense matrix // anyway. Sparse matrices make the most sense for iterative solvers return (new DenseMatrix(this)).inverse(); }