@@ -103,10 +103,16 @@ function init_cacheval(alg::Union{LUFactorization, GenericLUFactorization}, A, b
103
103
ArrayInterface. lu_instance (convert (AbstractMatrix, A))
104
104
end
105
105
106
+ function init_cacheval (alg:: Union{LUFactorization, GenericLUFactorization} , A:: MatrixOperator , b, u, Pl, Pr,
107
+ maxiters:: Int , abstol, reltol, verbose:: Bool ,
108
+ assumptions:: OperatorAssumptions )
109
+ ArrayInterface. lu_instance (convert (AbstractMatrix, A))
110
+ end
111
+
106
112
const PREALLOCATED_LU = ArrayInterface. lu_instance (rand (1 , 1 ))
107
113
108
114
function init_cacheval (alg:: Union{LUFactorization, GenericLUFactorization} ,
109
- A:: Matrix{Float64} , b, u, Pl, Pr,
115
+ A:: Union{ Matrix{Float64},MatrixOperator{Float64, Matrix{Float64}} } , b, u, Pl, Pr,
110
116
maxiters:: Int , abstol, reltol, verbose:: Bool ,
111
117
assumptions:: OperatorAssumptions )
112
118
PREALLOCATED_LU
175
181
176
182
const PREALLOCATED_QR = ArrayInterface. qr_instance (rand (1 , 1 ))
177
183
178
- function init_cacheval (alg:: QRFactorization , A:: Matrix{Float64} , b, u, Pl, Pr,
184
+ function init_cacheval (alg:: QRFactorization , A:: Union{ Matrix{Float64}, MatrixOperator{Float64, Matrix{Float64}} } , b, u, Pl, Pr,
179
185
maxiters:: Int , abstol, reltol, verbose:: Bool ,
180
186
assumptions:: OperatorAssumptions )
181
187
PREALLOCATED_QR
254
260
255
261
const PREALLOCATED_CHOLESKY = ArrayInterface. cholesky_instance (rand (1 , 1 ), cholpivot)
256
262
257
- function init_cacheval (alg:: CholeskyFactorization , A:: Matrix{Float64} , b, u, Pl, Pr,
263
+ function init_cacheval (alg:: CholeskyFactorization , A:: Union{ Matrix{Float64}, MatrixOperator{Float64, Matrix{Float64}} } , b, u, Pl, Pr,
258
264
maxiters:: Int , abstol, reltol, verbose:: Bool ,
259
265
assumptions:: OperatorAssumptions )
260
266
PREALLOCATED_CHOLESKY
346
352
347
353
const PREALLOCATED_SVD = ArrayInterface. svd_instance (rand (1 , 1 ))
348
354
349
- function init_cacheval (alg:: SVDFactorization , A:: Matrix{Float64} , b, u, Pl, Pr,
355
+ function init_cacheval (alg:: SVDFactorization , A:: Union{ Matrix{Float64}, MatrixOperator{Float64, Matrix{Float64}} } , b, u, Pl, Pr,
350
356
maxiters:: Int , abstol, reltol, verbose:: Bool ,
351
357
assumptions:: OperatorAssumptions )
352
358
PREALLOCATED_SVD
@@ -671,7 +677,7 @@ function init_cacheval(alg::UMFPACKFactorization,
671
677
nothing
672
678
end
673
679
674
- function init_cacheval (alg:: UMFPACKFactorization , A:: SparseMatrixCSC{Float64, Int} , b, u,
680
+ function init_cacheval (alg:: UMFPACKFactorization , A:: Union{ SparseMatrixCSC{Float64, Int}, MatrixOperator{Float64, Matrix{Float64}} } , b, u,
675
681
Pl, Pr,
676
682
maxiters:: Int , abstol, reltol,
677
683
verbose:: Bool , assumptions:: OperatorAssumptions )
@@ -768,7 +774,7 @@ function init_cacheval(alg::KLUFactorization,
768
774
nothing
769
775
end
770
776
771
- function init_cacheval (alg:: KLUFactorization , A:: SparseMatrixCSC{Float64, Int} , b, u, Pl,
777
+ function init_cacheval (alg:: KLUFactorization , A:: Union{ SparseMatrixCSC{Float64, Int}, MatrixOperator{Float64, Matrix{Float64}} } , b, u, Pl,
772
778
Pr,
773
779
maxiters:: Int , abstol, reltol,
774
780
verbose:: Bool , assumptions:: OperatorAssumptions )
@@ -855,7 +861,7 @@ function init_cacheval(alg::CHOLMODFactorization,
855
861
nothing
856
862
end
857
863
858
- function init_cacheval (alg:: CHOLMODFactorization , A:: SparseMatrixCSC{Float64, Int} , b, u,
864
+ function init_cacheval (alg:: CHOLMODFactorization , A:: Union{ SparseMatrixCSC{Float64, Int}, MatrixOperator{Float64, Matrix{Float64}} } , b, u,
859
865
Pl, Pr,
860
866
maxiters:: Int , abstol, reltol,
861
867
verbose:: Bool , assumptions:: OperatorAssumptions )
@@ -911,7 +917,13 @@ function init_cacheval(alg::RFLUFactorization, A, b, u, Pl, Pr, maxiters::Int,
911
917
ArrayInterface. lu_instance (convert (AbstractMatrix, A)), ipiv
912
918
end
913
919
914
- function init_cacheval (alg:: RFLUFactorization , A:: Matrix{Float64} , b, u, Pl, Pr,
920
+ function init_cacheval (alg:: RFLUFactorization , A:: MatrixOperator , b, u, Pl, Pr, maxiters:: Int ,
921
+ abstol, reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
922
+ ipiv = Vector {LinearAlgebra.BlasInt} (undef, min (size (A)... ))
923
+ ArrayInterface. lu_instance (convert (AbstractMatrix, A)), ipiv
924
+ end
925
+
926
+ function init_cacheval (alg:: RFLUFactorization , A:: Union{Matrix{Float64}, MatrixOperator{Float64, Matrix{Float64}}} , b, u, Pl, Pr,
915
927
maxiters:: Int ,
916
928
abstol, reltol, verbose:: Bool , assumptions:: OperatorAssumptions )
917
929
ipiv = Vector {LinearAlgebra.BlasInt} (undef, 0 )
@@ -1266,7 +1278,7 @@ function init_cacheval(alg::SparspakFactorization,
1266
1278
nothing
1267
1279
end
1268
1280
1269
- function init_cacheval (:: SparspakFactorization , A:: SparseMatrixCSC{Float64, Int} , b, u, Pl,
1281
+ function init_cacheval (:: SparspakFactorization , A:: Union{ SparseMatrixCSC{Float64, Int}, MatrixOperator{Float64, Matrix{Float64}} } , b, u, Pl,
1270
1282
Pr, maxiters:: Int , abstol,
1271
1283
reltol,
1272
1284
verbose:: Bool , assumptions:: OperatorAssumptions )
0 commit comments