@@ -23,9 +23,9 @@ It uses `Krylov.jl` methods to solve least-squares and least-norm problems.
23
23
struct IterativeSolver{
24
24
T <: AbstractFloat ,
25
25
S,
26
- SS1 <: KrylovSolver {T, T, S} ,
27
- SS2 <: KrylovSolver {T, T, S} ,
28
- SS3 <: KrylovSolver {T, T, S} ,
26
+ SS1 <: KrylovWorkspace {T, T, S} ,
27
+ SS2 <: KrylovWorkspace {T, T, S} ,
28
+ SS3 <: KrylovWorkspace {T, T, S} ,
29
29
It <: Integer ,
30
30
} <: QDSolver
31
31
# parameters for least-square solve
@@ -72,15 +72,15 @@ struct IterativeSolver{
72
72
q2:: S # part 2: solution of 2nd LS
73
73
end
74
74
75
- # import Krylov.LsqrSolver
75
+ # import Krylov.LsqrWorkspace
76
76
#=
77
- mutable struct LsqrSolver2 {T,S} <: KrylovSolver {T,S}
77
+ mutable struct LsqrWorkspace2 {T,S} <: KrylovWorkspace {T,S}
78
78
x :: S
79
79
Nv :: S
80
80
w :: S
81
81
Mu :: S
82
82
83
- function LsqrSolver2 (n, m, S, T)
83
+ function LsqrWorkspace2 (n, m, S, T)
84
84
x = S(undef, m)
85
85
Nv = S(undef, m)
86
86
w = S(undef, m)
@@ -113,17 +113,17 @@ function IterativeSolver(
113
113
ne_etol:: T = √ eps (T),
114
114
ne_itmax:: Int = 0 ,
115
115
ne_conlim:: T = 1 / √ eps (T),
116
- solver_struct_least_square:: KrylovSolver {T, T, S} = LsqrSolver (
116
+ solver_struct_least_square:: KrylovWorkspace {T, T, S} = LsqrWorkspace (
117
117
nlp. meta. nvar,
118
118
explicit_linear_constraints ? nlp. meta. nnln : nlp. meta. ncon,
119
119
S,
120
120
),
121
- solver_struct_least_norm:: KrylovSolver {T, T, S} = CraigSolver ( # LnlqSolver(
121
+ solver_struct_least_norm:: KrylovWorkspace {T, T, S} = CraigWorkspace ( # LnlqSolver(
122
122
explicit_linear_constraints ? nlp. meta. nnln : nlp. meta. ncon,
123
123
nlp. meta. nvar,
124
124
S,
125
125
),
126
- solver_struct_pinv:: KrylovSolver {T, T, S} = MinresSolver (
126
+ solver_struct_pinv:: KrylovWorkspace {T, T, S} = MinresWorkspace (
127
127
explicit_linear_constraints ? nlp. meta. nnln : nlp. meta. ncon,
128
128
explicit_linear_constraints ? nlp. meta. nnln : nlp. meta. ncon,
129
129
S,
@@ -170,7 +170,7 @@ function solve_least_square(
170
170
b,
171
171
λ,
172
172
) where {T, S, SS1, SS2, SS3, It}
173
- Krylov . solve ! (
173
+ krylov_solve ! (
174
174
qdsolver. solver_struct_least_square,
175
175
A,
176
176
b,
@@ -212,7 +212,7 @@ function solve_least_norm(
212
212
A,
213
213
b,
214
214
δ,
215
- ) where {T, S, SS1, SS2 <: CraigSolver , SS3, It}
215
+ ) where {T, S, SS1, SS2 <: CraigWorkspace , SS3, It}
216
216
if δ != 0
217
217
craig! (
218
218
qdsolver. solver_struct_least_norm,
@@ -256,7 +256,7 @@ function solve_least_norm(
256
256
) where {T, S, SS1, SS2, SS3, It}
257
257
ncon = length (b)
258
258
if δ != 0
259
- Krylov . solve ! (
259
+ krylov_solve ! (
260
260
qdsolver. solver_struct_least_norm,
261
261
A,
262
262
b,
@@ -266,7 +266,7 @@ function solve_least_norm(
266
266
itmax = qdsolver. ln_itmax,
267
267
)
268
268
else
269
- Krylov . solve ! (
269
+ krylov_solve ! (
270
270
qdsolver. solver_struct_least_norm,
271
271
A,
272
272
b,
0 commit comments