From cce17d085c2dffbeee0a1529b5e822116d35fffa Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Wed, 24 Feb 2021 19:21:15 -0500 Subject: [PATCH] Allows symmetric and hermitian options for all PreallocatedLinearOperator --- src/PreallocatedLinearOperators.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PreallocatedLinearOperators.jl b/src/PreallocatedLinearOperators.jl index 9b6926dd..76d99b85 100644 --- a/src/PreallocatedLinearOperators.jl +++ b/src/PreallocatedLinearOperators.jl @@ -117,7 +117,7 @@ Constructs a linear operator from a symmetric tridiagonal matrix. If its elements are real, it is also Hermitian, otherwise complex symmetric. """ -function PreallocatedLinearOperator(M :: SymTridiagonal{T}; storagetype=Vector{T}) where T +function PreallocatedLinearOperator(M :: SymTridiagonal{T}; storagetype=Vector{T}, kwargs...) where T nrow, ncol = size(M) Mv = storagetype(undef, nrow) hermitian = eltype(M) <: Real @@ -132,7 +132,7 @@ Constructs a linear operator from a symmetric matrix. If its elements are real, it is also Hermitian, otherwise complex symmetric. """ -function PreallocatedLinearOperator(M :: Symmetric{T}; storagetype=Vector{T}) where T +function PreallocatedLinearOperator(M :: Symmetric{T}; storagetype=Vector{T}, kwargs...) where T nrow, ncol = size(M) Mv = storagetype(undef, nrow) hermitian = eltype(M) <: Real @@ -146,7 +146,7 @@ end Constructs a linear operator from a Hermitian matrix. If its elements are real, it is also symmetric. """ -function PreallocatedLinearOperator(M :: Hermitian{T}; storagetype=Vector{T}) where T +function PreallocatedLinearOperator(M :: Hermitian{T}; storagetype=Vector{T}, kwargs...) where T nrow, ncol = size(M) Mv = storagetype(undef, nrow) symmetric = eltype(M) <: Real