@@ -15,7 +15,7 @@ import SparseArrays: nnz
15
15
import Serialization: AbstractSerializer, deserialize, serialize
16
16
using Serialization
17
17
18
- import .. increment, .. increment!, .. decrement, .. decrement!
18
+ import .. increment, .. increment!, .. decrement, .. decrement!, .. AdjType, .. TransType
19
19
20
20
using .. LibSuiteSparse
21
21
import .. LibSuiteSparse:
@@ -255,7 +255,7 @@ workspace_W_size(F::UmfpackLU) = workspace_W_size(F, has_refinement(F))
255
255
workspace_W_size (S:: Union{UmfpackLU{<:AbstractFloat}, AbstractSparseMatrixCSC{<:AbstractFloat}} , refinement:: Bool ) = refinement ? 5 * size (S, 2 ) : size (S, 2 )
256
256
workspace_W_size (S:: Union{UmfpackLU{<:Complex}, AbstractSparseMatrixCSC{<:Complex}} , refinement:: Bool ) = refinement ? 10 * size (S, 2 ) : 4 * size (S, 2 )
257
257
258
- const ATLU = Union{Transpose {<: Any , <: UmfpackLU }, Adjoint {<: Any , <: UmfpackLU }}
258
+ const ATLU = Union{TransType {<: Any , <: UmfpackLU }, AdjType {<: Any , <: UmfpackLU }}
259
259
has_refinement (F:: ATLU ) = has_refinement (F. parent)
260
260
has_refinement (F:: UmfpackLU ) = has_refinement (F. control)
261
261
has_refinement (control:: AbstractVector ) = control[JL_UMFPACK_IRSTEP] > 0
@@ -293,8 +293,10 @@ Base.copy(F::UmfpackLU{Tv, Ti}, ws=UmfpackWS(F)) where {Tv, Ti} =
293
293
Base. copy (F:: T , ws= UmfpackWS (F)) where {T <: ATLU } =
294
294
T (copy (parent (F), ws))
295
295
296
- Base. adjoint (F:: UmfpackLU ) = Adjoint (F)
297
- Base. transpose (F:: UmfpackLU ) = Transpose (F)
296
+ if ! isdefined (LinearAlgebra, :AdjointFactorization )
297
+ Base. adjoint (F:: UmfpackLU ) = Adjoint (F)
298
+ Base. transpose (F:: UmfpackLU ) = Transpose (F)
299
+ end
298
300
299
301
function Base. lock (f:: Function , F:: UmfpackLU )
300
302
lock (F)
@@ -936,28 +938,28 @@ import LinearAlgebra.ldiv!
936
938
937
939
ldiv! (lu:: UmfpackLU{T} , B:: StridedVecOrMat{T} ) where {T<: UMFVTypes } =
938
940
ldiv! (B, lu, copy (B))
939
- ldiv! (translu:: Transpose {T,<:UmfpackLU{T}} , B:: StridedVecOrMat{T} ) where {T<: UMFVTypes } =
940
- (lu = translu . parent; ldiv! (B, transpose (lu) , copy (B) ))
941
- ldiv! (adjlu:: Adjoint {T,<:UmfpackLU{T}} , B:: StridedVecOrMat{T} ) where {T<: UMFVTypes } =
942
- (lu = adjlu . parent; ldiv! (B, adjoint (lu) , copy (B) ))
941
+ ldiv! (translu:: TransType {T,<:UmfpackLU{T}} , B:: StridedVecOrMat{T} ) where {T<: UMFVTypes } =
942
+ ldiv! (B, translu , copy (B))
943
+ ldiv! (adjlu:: AdjType {T,<:UmfpackLU{T}} , B:: StridedVecOrMat{T} ) where {T<: UMFVTypes } =
944
+ ldiv! (B, adjlu , copy (B))
943
945
ldiv! (lu:: UmfpackLU{Float64} , B:: StridedVecOrMat{<:Complex} ) =
944
946
ldiv! (B, lu, copy (B))
945
- ldiv! (translu:: Transpose {Float64,<:UmfpackLU{Float64}} , B:: StridedVecOrMat{<:Complex} ) =
946
- (lu = translu . parent; ldiv! (B, transpose (lu) , copy (B) ))
947
- ldiv! (adjlu:: Adjoint {Float64,<:UmfpackLU{Float64}} , B:: StridedVecOrMat{<:Complex} ) =
948
- (lu = adjlu . parent; ldiv! (B, adjoint (lu) , copy (B) ))
947
+ ldiv! (translu:: TransType {Float64,<:UmfpackLU{Float64}} , B:: StridedVecOrMat{<:Complex} ) =
948
+ ldiv! (B, translu , copy (B))
949
+ ldiv! (adjlu:: AdjType {Float64,<:UmfpackLU{Float64}} , B:: StridedVecOrMat{<:Complex} ) =
950
+ ldiv! (B, adjlu , copy (B))
949
951
950
952
ldiv! (X:: StridedVecOrMat{T} , lu:: UmfpackLU{T} , B:: StridedVecOrMat{T} ) where {T<: UMFVTypes } =
951
953
_Aq_ldiv_B! (X, lu, B, UMFPACK_A)
952
- ldiv! (X:: StridedVecOrMat{T} , translu:: Transpose {T,<:UmfpackLU{T}} , B:: StridedVecOrMat{T} ) where {T<: UMFVTypes } =
954
+ ldiv! (X:: StridedVecOrMat{T} , translu:: TransType {T,<:UmfpackLU{T}} , B:: StridedVecOrMat{T} ) where {T<: UMFVTypes } =
953
955
(lu = translu. parent; _Aq_ldiv_B! (X, lu, B, UMFPACK_Aat))
954
- ldiv! (X:: StridedVecOrMat{T} , adjlu:: Adjoint {T,<:UmfpackLU{T}} , B:: StridedVecOrMat{T} ) where {T<: UMFVTypes } =
956
+ ldiv! (X:: StridedVecOrMat{T} , adjlu:: AdjType {T,<:UmfpackLU{T}} , B:: StridedVecOrMat{T} ) where {T<: UMFVTypes } =
955
957
(lu = adjlu. parent; _Aq_ldiv_B! (X, lu, B, UMFPACK_At))
956
958
ldiv! (X:: StridedVecOrMat{Tb} , lu:: UmfpackLU{Float64} , B:: StridedVecOrMat{Tb} ) where {Tb<: Complex } =
957
959
_Aq_ldiv_B! (X, lu, B, UMFPACK_A)
958
- ldiv! (X:: StridedVecOrMat{Tb} , translu:: Transpose {Float64,<:UmfpackLU{Float64}} , B:: StridedVecOrMat{Tb} ) where {Tb<: Complex } =
960
+ ldiv! (X:: StridedVecOrMat{Tb} , translu:: TransType {Float64,<:UmfpackLU{Float64}} , B:: StridedVecOrMat{Tb} ) where {Tb<: Complex } =
959
961
(lu = translu. parent; _Aq_ldiv_B! (X, lu, B, UMFPACK_Aat))
960
- ldiv! (X:: StridedVecOrMat{Tb} , adjlu:: Adjoint {Float64,<:UmfpackLU{Float64}} , B:: StridedVecOrMat{Tb} ) where {Tb<: Complex } =
962
+ ldiv! (X:: StridedVecOrMat{Tb} , adjlu:: AdjType {Float64,<:UmfpackLU{Float64}} , B:: StridedVecOrMat{Tb} ) where {Tb<: Complex } =
961
963
(lu = adjlu. parent; _Aq_ldiv_B! (X, lu, B, UMFPACK_At))
962
964
963
965
function _Aq_ldiv_B! (X:: StridedVecOrMat , lu:: UmfpackLU , B:: StridedVecOrMat , transposeoptype)
0 commit comments