2525
2626# the following for multiplying with transpose and ctranspose map are optional:
2727# subtypes can overwrite nonmutating methods, implement mutating methods or do nothing
28- Base. At_mul_B (A:: AbstractLinearMap ,x:: AbstractVector )= (@which Base. At_mul_B! (x,A,x))!= methods (Base. At_mul_B!,(AbstractVector,AbstractLinearMap,AbstractVector))[end ] ?
28+ Base. At_mul_B (A:: AbstractLinearMap ,x:: AbstractVector )= (@which Base. At_mul_B! (x,A,x))!= methods (Base. At_mul_B!,(AbstractVector,AbstractLinearMap,AbstractVector))[end ] ?
2929 Base. At_mul_B! (similar (x,promote_type (eltype (A),eltype (x)),size (A,2 )),A,x) : throw (MethodError (Base. At_mul_B,(A,x)))
3030Base. At_mul_B! (y:: AbstractVector ,A:: AbstractLinearMap ,x:: AbstractVector )= begin
3131 length (y)== size (A,2 ) || throw (DimensionMismatch (" At_mul_B!" ))
3232 (@which Base. At_mul_B (A,x))!= methods (Base. At_mul_B,(AbstractLinearMap,AbstractVector))[end ] ? copy! (y,Base. At_mul_B (A,x)) : throw (MethodError (Base. At_mul_B!,(y,A,x)))
3333end
34- Base. Ac_mul_B (A:: AbstractLinearMap ,x:: AbstractVector )= (@which Base. Ac_mul_B! (x,A,x))!= methods (Base. Ac_mul_B!,(AbstractVector,AbstractLinearMap,AbstractVector))[end ] ?
34+ Base. Ac_mul_B (A:: AbstractLinearMap ,x:: AbstractVector )= (@which Base. Ac_mul_B! (x,A,x))!= methods (Base. Ac_mul_B!,(AbstractVector,AbstractLinearMap,AbstractVector))[end ] ?
3535 Base. Ac_mul_B! (similar (x,promote_type (eltype (A),eltype (x)),size (A,2 )),A,x) : throw (MethodError (Base. Ac_mul_B,(A,x)))
3636Base. Ac_mul_B! (y:: AbstractVector ,A:: AbstractLinearMap ,x:: AbstractVector )= begin
3737 length (y)== size (A,2 ) || throw (DimensionMismatch (" At_mul_B!" ))
@@ -58,11 +58,11 @@ include("wrappedmap.jl") # wrap a matrix of linear map in a new type, thereby al
5858include (" identitymap.jl" ) # the identity map, to be able to make linear combinations of AbstractLinearMap objects and I
5959include (" functionmap.jl" ) # using a function as linear map
6060
61- LinearMap {T} (A:: Union(AbstractMatrix{T},AbstractLinearMap{T}) ;isreal:: Bool = Base. isreal (A),issym:: Bool = Base. issym (A),ishermitian:: Bool = Base. ishermitian (A),isposdef:: Bool = Base. isposdef (A)) =
61+ LinearMap {T} (A:: Union(AbstractMatrix{T},AbstractLinearMap{T}) ;isreal:: Bool = Base. isreal (A),issym:: Bool = Base. issym (A),ishermitian:: Bool = Base. ishermitian (A),isposdef:: Bool = Base. isposdef (A)) =
6262 WrappedMap (A;isreal= isreal,issym= issym,ishermitian= ishermitian,isposdef= isposdef)
63- LinearMap (f:: Function ,M:: Int ,N:: Int = M;ismutating:: Bool = false ,isreal:: Bool = true ,issym:: Bool = false ,ishermitian:: Bool = (isreal && issym),isposdef:: Bool = false ,ftranspose:: OptionalFunction = nothing ,fctranspose:: OptionalFunction = nothing ) =
63+ LinearMap (f:: Function ,M:: Int ,N:: Int = M;ismutating:: Bool = false ,isreal:: Bool = true ,issym:: Bool = false ,ishermitian:: Bool = (isreal && issym),isposdef:: Bool = false ,ftranspose:: OptionalFunction = nothing ,fctranspose:: OptionalFunction = nothing ) =
6464 FunctionMap (f,M,N;ismutating= ismutating,isreal= isreal,issym= issym,ishermitian= ishermitian,isposdef= isposdef,ftranspose= ftranspose,fctranspose= fctranspose)
65- LinearMap (f:: Function ,eltype:: Type ,M:: Int ,N:: Int = M;ismutating:: Bool = false ,issym:: Bool = false ,ishermitian:: Bool = (T <: Real && issym),isposdef:: Bool = false ,ftranspose:: OptionalFunction = nothing ,fctranspose:: OptionalFunction = nothing ) =
65+ LinearMap (f:: Function ,eltype:: Type ,M:: Int ,N:: Int = M;ismutating:: Bool = false ,issym:: Bool = false ,ishermitian:: Bool = (eltype <: Real && issym),isposdef:: Bool = false ,ftranspose:: OptionalFunction = nothing ,fctranspose:: OptionalFunction = nothing ) =
6666 FunctionMap {eltype} (f,M,N;ismutating= ismutating,issym= issym,ishermitian= ishermitian,isposdef= isposdef,ftranspose= ftranspose,fctranspose= fctranspose)
6767
6868
0 commit comments