@@ -1387,15 +1387,14 @@ end
13871387 factorize(A)
13881388
13891389Compute a convenient factorization of `A`, based upon the type of the input matrix.
1390- `factorize` checks `A` to see if it is symmetric/triangular/etc. if `A` is passed
1391- as a generic matrix. `factorize` checks every element of `A` to verify/rule out
1392- each property. It will short-circuit as soon as it can rule out symmetry/triangular
1393- structure. The return value can be reused for efficient solving of multiple
1394- systems. For example: `A=factorize(A); x=A\\ b; y=A\\ C`.
1390+ If `A` is passed as a generic matrix, `factorize` checks to see if it is
1391+ symmetric/triangular/etc. To this end, `factorize` may check every element of `A` to
1392+ verify/rule out each property. It will short-circuit as soon as it can rule out
1393+ symmetry/triangular structure. The return value can be reused for efficient solving
1394+ of multiple systems. For example: `A=factorize(A); x=A\\ b; y=A\\ C`.
13951395
13961396| Properties of `A` | type of factorization |
13971397|:---------------------------|:-----------------------------------------------|
1398- | Positive-definite | Cholesky (see [`cholesky`](@ref)) |
13991398| Dense Symmetric/Hermitian | Bunch-Kaufman (see [`bunchkaufman`](@ref)) |
14001399| Sparse Symmetric/Hermitian | LDLt (see [`ldlt`](@ref)) |
14011400| Triangular | Triangular |
@@ -1406,9 +1405,6 @@ systems. For example: `A=factorize(A); x=A\\b; y=A\\C`.
14061405| General square | LU (see [`lu`](@ref)) |
14071406| General non-square | QR (see [`qr`](@ref)) |
14081407
1409- If `factorize` is called on a Hermitian positive-definite matrix, for instance, then `factorize`
1410- will return a Cholesky factorization.
1411-
14121408# Examples
14131409```jldoctest
14141410julia> A = Array(Bidiagonal(fill(1.0, (5, 5)), :U))
@@ -1427,8 +1423,9 @@ julia> factorize(A) # factorize will check to see that A is already factorized
14271423 ⋅ ⋅ ⋅ 1.0 1.0
14281424 ⋅ ⋅ ⋅ ⋅ 1.0
14291425```
1430- This returns a `5×5 Bidiagonal{Float64}`, which can now be passed to other linear algebra functions
1431- (e.g. eigensolvers) which will use specialized methods for `Bidiagonal` types.
1426+
1427+ This returns a `5×5 Bidiagonal{Float64}`, which can now be passed to other linear algebra
1428+ functions (e.g. eigensolvers) which will use specialized methods for `Bidiagonal` types.
14321429"""
14331430function factorize (A:: AbstractMatrix{T} ) where T
14341431 m, n = size (A)
@@ -1490,12 +1487,7 @@ function factorize(A::AbstractMatrix{T}) where T
14901487 return UpperTriangular (A)
14911488 end
14921489 if herm
1493- cf = cholesky (A; check = false )
1494- if cf. info == 0
1495- return cf
1496- else
1497- return factorize (Hermitian (A))
1498- end
1490+ return factorize (Hermitian (A))
14991491 end
15001492 if sym
15011493 return factorize (Symmetric (A))
0 commit comments