Skip to content

Commit 58f7961

Browse files
tpappfredrikekre
authored andcommitted
Update docstring of bkfact and related getindex. (#25185)
* Update docstring of bkfact and related getindex. To be compatible with 88e7fbc. Also include the actual decomposition format. Fix missing permutation matrix in the `getindex` docstring. * Removed transpose from second permutation matrix. Also mention properties of permutation matrix in docstring.
1 parent 1238bad commit 58f7961

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

base/linalg/bunchkaufman.jl

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,15 @@ function bkfact!(A::StridedMatrix{<:BlasFloat}, rook::Bool = false)
4141
end
4242

4343
"""
44-
bkfact(A, uplo::Symbol=:U, symmetric::Bool=issymmetric(A), rook::Bool=false) -> BunchKaufman
44+
bkfact(A, rook::Bool=false) -> BunchKaufman
4545
46-
Compute the Bunch-Kaufman [^Bunch1977] factorization of a symmetric or Hermitian
47-
matrix `A` and return a `BunchKaufman` object.
48-
`uplo` indicates which triangle of matrix `A` to reference.
49-
If `symmetric` is `true`, `A` is assumed to be symmetric. If `symmetric` is `false`,
50-
`A` is assumed to be Hermitian. If `rook` is `true`, rook pivoting is used. If
51-
`rook` is false, rook pivoting is not used.
52-
The following functions are available for
53-
`BunchKaufman` objects: [`size`](@ref), `\\`, [`inv`](@ref), [`issymmetric`](@ref), [`ishermitian`](@ref).
46+
Compute the Bunch-Kaufman [^Bunch1977] factorization of a symmetric or Hermitian matrix `A` as ``PUDU'P`` or ``PLDL'P``, depending on which triangle is stored in `A`, and return a `BunchKaufman` object.
47+
48+
If `rook` is `true`, rook pivoting is used. If `rook` is false, rook pivoting is not used.
49+
50+
The following functions are available for `BunchKaufman` objects: [`size`](@ref), `\\`, [`inv`](@ref), [`issymmetric`](@ref), [`ishermitian`](@ref), [`getindex`](@ref).
51+
52+
Note that `P` is symmetric, so ``P=P⁻¹=P'``.
5453
5554
[^Bunch1977]: J R Bunch and L Kaufman, Some stable methods for calculating inertia and solving symmetric linear systems, Mathematics of Computation 31:137 (1977), 163-179. [url](http://www.ams.org/journals/mcom/1977-31-137/S0025-5718-1977-0428694-0/).
5655
@@ -118,9 +117,11 @@ end
118117
getproperty(B::BunchKaufman, d::Symbol)
119118
120119
Extract the factors of the Bunch-Kaufman factorization `B`. The factorization can take the
121-
two forms `L*D*L'` or `U*D*U'` (or `L*D*Transpose(L)` in the complex symmetric case) where `L` is a
122-
`UnitLowerTriangular` matrix, `U` is a `UnitUpperTriangular`, and `D` is a block diagonal
123-
symmetric or Hermitian matrix with 1x1 or 2x2 blocks. The argument `d` can be
120+
two forms `P*L*D*L'*P` or `P*U*D*U'*P` (or `L*D*Transpose(L)` in the complex symmetric case)
121+
where `P` is a (symmetric) permutation matrix, `L` is a `UnitLowerTriangular` matrix, `U` is a
122+
`UnitUpperTriangular`, and `D` is a block diagonal symmetric or Hermitian matrix with
123+
1x1 or 2x2 blocks. The argument `d` can be
124+
124125
- `:D`: the block diagonal matrix
125126
- `:U`: the upper triangular factor (if factorization is `U*D*U'`)
126127
- `:L`: the lower triangular factor (if factorization is `L*D*L'`)

0 commit comments

Comments
 (0)