Skip to content

Commit

Permalink
Updated documentation for lufact!, qrfact!, cholfact! and scale!
Browse files Browse the repository at this point in the history
Update documentation for `lufact!`. Fixes #16193.

removed documentation for sparse lufact

improved documentation for qrfact

improved documentation for scale

improved documentation for cholfact!

Revert changes to .rst

This reverts commit 9f727c4.

Improved documentation of cholfact!

Removed trailing whitespace

run make docs to apply changes to .rst file

Changed double to single backticks

updated linalg.rst
  • Loading branch information
gasagna authored and Davide Lasagna committed May 8, 2016
1 parent e4b8420 commit d248cd6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
13 changes: 8 additions & 5 deletions base/docs/helpdb/Base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5672,9 +5672,9 @@ Base.(:(.!=))
lufact!(A) -> LU
`lufact!` is the same as [`lufact`](:func:`lufact`), but saves space by overwriting the
input `A`, instead of creating a copy. For sparse `A` the `nzval` field is not overwritten
but the index fields, `colptr` and `rowval` are decremented in place, converting from
1-based indices to 0-based indices.
input `A`, instead of creating a copy. An `InexactError` exception is thrown if the
factorisation produces a number not representable by the element type of `A`, e.g. for
integer types.
"""
lufact!

Expand Down Expand Up @@ -6552,8 +6552,9 @@ Scale an array `A` by a scalar `b` overwriting `A` in-place.
If `A` is a matrix and `b` is a vector, then `scale!(A,b)` scales each column `i` of `A` by
`b[i]` (similar to `A*Diagonal(b)`), while `scale!(b,A)` scales each row `i` of `A` by `b[i]`
(similar to `Diagonal(b)*A`), again operating in-place on `A`.
(similar to `Diagonal(b)*A`), again operating in-place on `A`. An `InexactError` exception is
thrown if the scaling produces a number not representable by the element type of `A`,
e.g. for integer types.
"""
scale!

Expand Down Expand Up @@ -8573,6 +8574,8 @@ Ac_mul_B
`qrfact!` is the same as [`qrfact`](:func:`qrfact`) when `A` is a subtype of
`StridedMatrix`, but saves space by overwriting the input `A`, instead of creating a copy.
An `InexactError` exception is thrown if the factorisation produces a number not
representable by the element type of `A`, e.g. for integer types.
"""
qrfact!

Expand Down
10 changes: 8 additions & 2 deletions base/linalg/cholesky.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ end
"""
cholfact!(A::StridedMatrix, uplo::Symbol, Val{false}) -> Cholesky
The same as `cholfact`, but saves space by overwriting the input `A`, instead of creating a copy.
The same as `cholfact`, but saves space by overwriting the input `A`, instead
of creating a copy. An `InexactError` exception is thrown if the factorisation
produces a number not representable by the element type of `A`, e.g. for
integer types.
"""
function cholfact!(A::StridedMatrix, uplo::Symbol, ::Type{Val{false}})
if uplo == :U
Expand All @@ -139,7 +142,10 @@ end
"""
cholfact!(A::StridedMatrix, uplo::Symbol, Val{true}) -> PivotedCholesky
The same as `cholfact`, but saves space by overwriting the input `A`, instead of creating a copy.
The same as `cholfact`, but saves space by overwriting the input `A`, instead
of creating a copy. An `InexactError` exception is thrown if the
factorisation produces a number not representable by the element type of `A`,
e.g. for integer types.
"""
cholfact!(A::StridedMatrix, uplo::Symbol, ::Type{Val{true}}; tol = 0.0) =
throw(ArgumentError("generic pivoted Cholesky fectorization is not implemented yet"))
Expand Down
10 changes: 5 additions & 5 deletions doc/stdlib/linalg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Linear algebra functions in Julia are largely implemented by calling functions f

.. Docstring generated from Julia source
``lufact!`` is the same as :func:`lufact`\ , but saves space by overwriting the input ``A``\ , instead of creating a copy. For sparse ``A`` the ``nzval`` field is not overwritten but the index fields, ``colptr`` and ``rowval`` are decremented in place, converting from 1-based indices to 0-based indices.
``lufact!`` is the same as :func:`lufact`\ , but saves space by overwriting the input ``A``\ , instead of creating a copy. An ``InexactError`` exception is thrown if the factorisation produces a number not representable by the element type of ``A``\ , e.g. for integer types.

.. function:: chol(A::AbstractMatrix) -> U

Expand Down Expand Up @@ -209,13 +209,13 @@ Linear algebra functions in Julia are largely implemented by calling functions f

.. Docstring generated from Julia source
The same as ``cholfact``\ , but saves space by overwriting the input ``A``\ , instead of creating a copy.
The same as ``cholfact``\ , but saves space by overwriting the input ``A``\ , instead of creating a copy. An ``InexactError`` exception is thrown if the factorisation produces a number not representable by the element type of ``A``\ , e.g. for integer types.

.. function:: cholfact!(A::StridedMatrix, uplo::Symbol, Val{true}) -> PivotedCholesky

.. Docstring generated from Julia source
The same as ``cholfact``\ , but saves space by overwriting the input ``A``\ , instead of creating a copy.
The same as ``cholfact``\ , but saves space by overwriting the input ``A``\ , instead of creating a copy. An ``InexactError`` exception is thrown if the factorisation produces a number not representable by the element type of ``A``\ , e.g. for integer types.

.. currentmodule:: Base.LinAlg

Expand Down Expand Up @@ -395,7 +395,7 @@ Linear algebra functions in Julia are largely implemented by calling functions f

.. Docstring generated from Julia source
``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.
``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. An ``InexactError`` exception is thrown if the factorisation produces a number not representable by the element type of ``A``\ , e.g. for integer types.

.. function:: full(QRCompactWYQ[, thin=true]) -> Matrix

Expand Down Expand Up @@ -816,7 +816,7 @@ Linear algebra functions in Julia are largely implemented by calling functions f
Scale an array ``A`` by a scalar ``b`` overwriting ``A`` in-place.

If ``A`` is a matrix and ``b`` is a vector, then ``scale!(A,b)`` scales each column ``i`` of ``A`` by ``b[i]`` (similar to ``A*Diagonal(b)``\ ), while ``scale!(b,A)`` scales each row ``i`` of ``A`` by ``b[i]`` (similar to ``Diagonal(b)*A``\ ), again operating in-place on ``A``\ .
If ``A`` is a matrix and ``b`` is a vector, then ``scale!(A,b)`` scales each column ``i`` of ``A`` by ``b[i]`` (similar to ``A*Diagonal(b)``\ ), while ``scale!(b,A)`` scales each row ``i`` of ``A`` by ``b[i]`` (similar to ``Diagonal(b)*A``\ ), again operating in-place on ``A``\ . An ``InexactError`` exception is thrown if the scaling produces a number not representable by the element type of ``A``\ , e.g. for integer types.

.. function:: Tridiagonal(dl, d, du)

Expand Down

0 comments on commit d248cd6

Please sign in to comment.