File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,7 @@ cheaply.
6767
6868## issingular(A)
6969
70- Check singularity by factorization or checking zeros of structured matrices.
71-
72- * Warning* : ` rank ` is a better choice for some matrices.
70+ Return an instance of the LU factorization object with the correct type cheaply.
7371
7472## List of things to add
7573
Original file line number Diff line number Diff line change @@ -111,9 +111,14 @@ has_sparsestruct(x::Type{<:SymTridiagonal}) = true
111111
112112Determine whether a given abstract matrix is singular.
113113"""
114+ issingular (A:: AbstractMatrix ) = issingular (Matrix (A))
115+ issingular (A:: AbstractSparseMatrix ) = ! issuccess (lu (A, check= false ))
114116issingular (A:: Matrix ) = ! issuccess (lu (A, check= false ))
115117issingular (A:: UniformScaling ) = A. λ == 0
116118issingular (A:: Diagonal ) = any (iszero,A. diag)
119+ issingular (B:: Bidiagonal ) = any (iszero, A. dv)
120+ issingular (S:: SymTridiagonal ) = diaganyzero (iszero, ldlt (S). data)
121+ issingular (T:: Tridiagonal ) = ! issuccess (lu (A, check= false ))
117122issingular (A:: Union{Hermitian,Symmetric} ) = diaganyzero (bunchkaufman (A, check= false ). LD)
118123issingular (A:: Union{LowerTriangular,UpperTriangular} ) = diaganyzero (A. data)
119124issingular (A:: Union{UnitLowerTriangular,UnitUpperTriangular} ) = false
You can’t perform that action at this time.
0 commit comments