1- export LSR1Operator, diag # , InverseLSR1Operator
1+ export LSR1Operator, diag
22
33" A data type to hold information relative to LSR1 operators."
44mutable struct LSR1Data{T, I <: Integer }
@@ -20,9 +20,7 @@ function LSR1Data(
2020 n:: I ;
2121 mem:: I = 5 ,
2222 scaling:: Bool = true ,
23- inverse:: Bool = false ,
2423) where {I <: Integer }
25- inverse && @warn " inverse LSR1 operator not yet implemented"
2624 LSR1Data {T, I} (
2725 max (mem, 1 ),
2826 scaling,
@@ -49,7 +47,6 @@ mutable struct LSR1Operator{T, I <: Integer, F, Ft, Fct} <: AbstractQuasiNewtonO
4947 prod!:: F # apply the operator to a vector
5048 tprod!:: Ft # apply the transpose operator to a vector
5149 ctprod!:: Fct # apply the transpose conjugate operator to a vector
52- inverse:: Bool
5350 data:: LSR1Data{T, I}
5451 nprod:: I
5552 ntprod:: I
@@ -64,7 +61,6 @@ LSR1Operator{T}(
6461 prod!:: F ,
6562 tprod!:: Ft ,
6663 ctprod!:: Fct ,
67- inverse:: Bool ,
6864 data:: LSR1Data{T, I} ,
6965) where {T, I <: Integer , F, Ft, Fct} = LSR1Operator {T, I, F, Ft, Fct} (
7066 nrow,
@@ -74,7 +70,6 @@ LSR1Operator{T}(
7470 prod!,
7571 tprod!,
7672 ctprod!,
77- inverse,
7873 data,
7974 0 ,
8075 0 ,
@@ -116,7 +111,7 @@ function LSR1Operator(T::Type, n::I; kwargs...) where {I <: Integer}
116111 end
117112
118113 prod! = @closure (res, x, α, β) -> lsr1_multiply (res, lsr1_data, x, α, β)
119- return LSR1Operator {T} (n, n, true , true , prod!, nothing , nothing , false , lsr1_data)
114+ return LSR1Operator {T} (n, n, true , true , prod!, nothing , nothing , lsr1_data)
120115end
121116
122117LSR1Operator (n:: I ; kwargs... ) where {I <: Integer } = LSR1Operator (Float64, n; kwargs... )
@@ -197,7 +192,6 @@ function diag(op::LSR1Operator{T}) where {T}
197192end
198193
199194function diag! (op:: LSR1Operator{T} , d) where {T}
200- op. inverse && throw (" only the diagonal of a forward L-SR1 approximation is available" )
201195 data = op. data
202196
203197 fill! (d, 1 )
0 commit comments