@@ -290,24 +290,16 @@ $(_kwargs(:sub_state; default = _glossary[:Variable][:evaluation][:default]))
290290$(_kwargs (:X ; add_properties = [:as_Memory ]))
291291"""
292292mutable struct ProximalGradientMethodState{
293- P,
294- T,
295- Pr <: Union{<:AbstractManoptProblem, F, Nothing} where {F},
296- St <: Union{<:AbstractManoptSolverState, Nothing} ,
297- A,
298- S <: StoppingCriterion ,
299- TStepsize <: Stepsize ,
300- RM <: AbstractRetractionMethod ,
301- IRM <: AbstractInverseRetractionMethod ,
302- R,
293+ P, T, Pr <: Union{<:AbstractManoptProblem, F, Nothing} where {F}, St <: Union{<:AbstractManoptSolverState, Nothing} ,
294+ A, SC <: StoppingCriterion , S <: Stepsize , RM <: AbstractRetractionMethod , IRM <: AbstractInverseRetractionMethod , R,
303295 } <: AbstractManoptSolverState
304296 a:: P
305297 acceleration:: A
306- stepsize:: TStepsize
298+ stepsize:: S
307299 last_stepsize:: R
308300 p:: P
309301 q:: P
310- stop:: S
302+ stop:: SC
311303 X:: T
312304 retraction_method:: RM
313305 inverse_retraction_method:: IRM
@@ -322,35 +314,22 @@ function ProximalGradientMethodState(
322314 copyto! (get_manifold (pr), st. a, st. p)
323315 return st
324316 end ,
325- stepsize:: TS = default_stepsize (M, ProximalGradientMethodState),
326- stopping_criterion:: S = StopWhenGradientMappingNormLess (1.0e-2 ) |
327- StopAfterIteration (5000 ) |
328- StopWhenChangeLess (M, 1.0e-9 ),
317+ stepsize:: S = default_stepsize (M, ProximalGradientMethodState),
318+ stopping_criterion:: SC = StopWhenGradientMappingNormLess (1.0e-2 ) | StopAfterIteration (5000 ) | StopWhenChangeLess (M, 1.0e-9 ),
329319 X:: T = zero_vector (M, p),
330320 retraction_method:: RM = default_retraction_method (M, typeof (p)),
331321 inverse_retraction_method:: IRM = default_inverse_retraction_method (M, typeof (p)),
332322 sub_problem:: Pr = nothing ,
333323 sub_state:: St = nothing , # AllocatingEvaluation(),
334324 ) where {
335- P,
336- T,
337- S <: StoppingCriterion ,
338- A,
339- Pr <: Union{<:AbstractManoptProblem, F, Nothing} where {F},
340- St <: Union{<:AbstractManoptSolverState, <:AbstractEvaluationType, Nothing} ,
341- RM <: AbstractRetractionMethod ,
342- IRM <: AbstractInverseRetractionMethod ,
343- TS <: Stepsize ,
325+ P, T, SC <: StoppingCriterion , A,
326+ Pr <: Union{<:AbstractManoptProblem, F, Nothing} where {F}, St <: Union{<:AbstractManoptSolverState, <:AbstractEvaluationType, Nothing} ,
327+ RM <: AbstractRetractionMethod , IRM <: AbstractInverseRetractionMethod , S <: Stepsize ,
344328 }
345- _sub_state = if sub_state isa AbstractEvaluationType
346- ClosedFormSubSolverState (; evaluation = sub_state)
347- else
348- sub_state
349- end
350-
329+ _sub_state = maybe_wrap_evaluation_type (sub_state)
351330 last_stepsize = zero (number_eltype (p))
352331 return ProximalGradientMethodState{
353- P, T, Pr, typeof (_sub_state), A, S, TS , RM, IRM, typeof (last_stepsize),
332+ P, T, Pr, typeof (_sub_state), A, SC, S , RM, IRM, typeof (last_stepsize),
354333 }(
355334 copy (M, p),
356335 acceleration,
0 commit comments