From 0fbfe1f5e6d452d26b65096007f8ec6a8969d3c8 Mon Sep 17 00:00:00 2001 From: Andreas Noack Jensen Date: Fri, 13 Feb 2015 16:13:10 -0500 Subject: [PATCH] Update NEWS.md and documentation for sparse QR. [ci skip] --- NEWS.md | 2 ++ doc/stdlib/linalg.rst | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index fe1d9d6bb8173..4491d1a48e1a8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -101,6 +101,8 @@ Library improvements * Large speedup in sparse ``\`` and splitting of Cholesky and LDLt factorizations into ``cholfact`` and ``ldltfact`` ([#10117]) + * Add sparse least squares to ``\`` by adding ``qrfact`` for sparse matrices based on the SPQR library. ([#10180]) + * Other improvements * `assert`, `@assert` now throws an `AssertionError` exception type ([#9734]). diff --git a/doc/stdlib/linalg.rst b/doc/stdlib/linalg.rst index 48d72d69854fd..d0024478853a9 100644 --- a/doc/stdlib/linalg.rst +++ b/doc/stdlib/linalg.rst @@ -21,7 +21,7 @@ Linear algebra functions in Julia are largely implemented by calling functions f .. function:: \\(A, B) :noindex: - Matrix division using a polyalgorithm. For input matrices ``A`` and ``B``, the result ``X`` is such that ``A*X == B`` when ``A`` is square. The solver that is used depends upon the structure of ``A``. A direct solver is used for upper- or lower triangular ``A``. For Hermitian ``A`` (equivalent to symmetric ``A`` for non-complex ``A``) the ``BunchKaufman`` factorization is used. Otherwise an LU factorization is used. For rectangular ``A`` the result is the minimum-norm least squares solution computed by a pivoted QR factorization of ``A`` and a rank estimate of A based on the R factor. For sparse, square ``A`` the LU factorization (from UMFPACK) is used. + Matrix division using a polyalgorithm. For input matrices ``A`` and ``B``, the result ``X`` is such that ``A*X == B`` when ``A`` is square. The solver that is used depends upon the structure of ``A``. A direct solver is used for upper- or lower triangular ``A``. For Hermitian ``A`` (equivalent to symmetric ``A`` for non-complex ``A``) the ``BunchKaufman`` factorization is used. Otherwise an LU factorization is used. For rectangular ``A`` the result is the minimum-norm least squares solution computed by a pivoted QR factorization of ``A`` and a rank estimate of A based on the R factor. When ``A`` is sparse, a similar polyalgorithm is used, but underdetermined systems are not supported. .. function:: dot(x, y) ⋅(x,y) @@ -161,9 +161,13 @@ Linear algebra functions in Julia are largely implemented by calling functions f .. [Bischof1987] C Bischof and C Van Loan, The WY representation for products of Householder matrices, SIAM J Sci Stat Comput 8 (1987), s2-s13. doi:10.1137/0908009 .. [Schreiber1989] R Schreiber and C Van Loan, A storage-efficient WY representation for products of Householder transformations, SIAM J Sci Stat Comput 10 (1989), 53-57. doi:10.1137/0910005 +.. function:: qrfact(A) -> SPQR.Factorization + + Compute the QR factorization of a sparse matrix ``A``. A fill-reducing permutation is used. The main application of this type is to solve least squares problems with ``\``. The function calls the C library SPQR and a few additional functions from the library are wrapped but not exported. + .. function:: qrfact!(A [,pivot=Val{false}]) - ``qrfact!`` is the same as :func:`qrfact`, but saves space by overwriting the input ``A``, instead of creating a copy. + ``qrfact!`` is the same as :func:`qrfact` when A is a subtype of ``StridedMatrix``, but saves space by overwriting the input ``A``, instead of creating a copy. .. function:: full(QRCompactWYQ[, thin=true]) -> Matrix