@@ -264,14 +264,25 @@ function show(io::IO, re::RecordEvery)
264264 return print (io, " RecordEvery($(re. record) , $(re. every) , $(re. always_update) )" )
265265end
266266function status_summary (re:: RecordEvery ; context:: Symbol = :default )
267- if context
268- s = " "
269- if re. record isa RecordGroup
270- s = status_summary (re. record)[3 : (end - 2 )]
271- else
272- s = " $(re. record) "
267+ if context === :short
268+ s = " "
269+ if re. record isa RecordGroup
270+ s = status_summary (re. record)[3 : (end - 2 )]
271+ else
272+ s = " $(re. record) "
273+ end
274+ return " [$s , $(re. every) ]"
273275 end
274- return " [$s , $(re. every) ]"
276+ s = " "
277+ (re. every % 10 == 2 ) && (s = " every $(re. every) nd" )
278+ (re. every % 10 == 3 ) && (s = " every $(re. every) rd" )
279+ (re. every % 10 ∉ [2 , 3 ]) && (s = " every $(re. every) th" )
280+ (re. every == 1 ) && (s = " every" )
281+ (context === :inline ) && return " A RecordAction that records its inner action $s iteration"
282+ return """
283+ A RecordAction that records $s iteration with\n
284+ $(_in_str (status_summary (re. record; context = context); indent = 1 ))
285+ """
275286end
276287get_record (r:: RecordEvery ) = get_record (r. record)
277288get_record (r:: RecordEvery , k) = get_record (r. record, k)
352363function status_summary (rg:: RecordGroup ; context:: Symbol = :default )
353364 (context === :short ) && (return " [ $(join ([" $(status_summary (ri)) " for ri in rg. group], " , " )) ]" )
354365 (context === :inline ) && (return " A group of $(length (rg. group)) RecordActions" )
355- return " A group of $(length (rg. group)) RecordActions:\n $(join ( [" * $(status_summary (ri; context= context)) " for ri in rg. group], " \n " )) \n "
366+ return " A group of $(length (rg. group)) RecordActions:\n $(join ([" * $(status_summary (ri; context = context)) " for ri in rg. group], " \n " )) \n "
356367end
357368function show (io:: IO , rg:: RecordGroup )
358369 s = join ([" $(ri) " for ri in rg. group], " , " )
433444function show (io:: IO , rsr:: RecordSubsolver{R} ) where {R}
434445 return print (io, " RecordSubsolver(; record=$(rsr. record) , record_type=$R )" )
435446end
436- status_summary (:: RecordSubsolver ) = " :Subsolver"
447+ function status_summary (:: RecordSubsolver{R} ; context:: Symbol = :default ) where {R}
448+ (context === :short ) && return " :Subsolver"
449+ (context === :inline ) && return " A RecordAction to specify something to record from each subolver run"
450+ return
451+ """
452+ A RecordAction to record elements of type $R in from each subsolver run
453+
454+ """
455+ end
437456
438457@doc """
439458 RecordWhenActive <: RecordAction
@@ -736,8 +755,10 @@ function (r::RecordIteration)(::AbstractManoptProblem, ::AbstractManoptSolverSta
736755 return record_or_reset! (r, k, k)
737756end
738757show (io:: IO , :: RecordIteration ) = print (io, " RecordIteration()" )
739- status_summary (:: RecordIteration ) = " :Iteration"
740-
758+ function status_summary (:: RecordIteration ; context:: Symbol = :default )
759+ (context === :short ) && return " :Iteration"
760+ return " A RecordAction to record the current iteration number"
761+ end
741762@doc """
742763 RecordStoppingReason <: RecordAction
743764
@@ -929,15 +950,15 @@ create a [`RecordAction`](@ref) where
929950* a [`RecordAction`](@ref) is passed through
930951* a [`Symbol`] creates
931952 * `:Change` to record the change of the iterates, see [`RecordChange`](@ref)
953+ * `:Cost` to record the current cost function value
932954 * `:Gradient` to record the gradient, see [`RecordGradient`](@ref)
933955 * `:GradientNorm to record the norm of the gradient, see [`RecordGradientNorm`](@ref)
934956 * `:Iterate` to record the iterate
935957 * `:Iteration` to record the current iteration number
936- * `IterativeTime` to record the time iteratively
937- * `:Cost` to record the current cost function value
958+ * `: IterativeTime` to record the times taken for each iteration.
959+ * `:ProximalParameter` to record the proximal parameter, see [`RecordProximalParameter`](@ref)
938960 * `:Stepsize` to record the current step size
939961 * `:Time` to record the total time taken after every iteration
940- * `:IterativeTime` to record the times taken for each iteration.
941962
942963and every other symbol is passed to [`RecordEntry`](@ref), which results in recording the
943964field of the state with the symbol indicating the field of the solver to record.
@@ -952,6 +973,7 @@ function RecordActionFactory(s::AbstractManoptSolverState, symbol::Symbol)
952973 (symbol == :Iterate ) && return RecordIterate (get_iterate (s))
953974 (symbol == :Iteration ) && return RecordIteration ()
954975 (symbol == :IterativeTime ) && return RecordTime (; mode = :iterative )
976+ (symbol == :ProximalParameter ) && return RecordProximalParameter ()
955977 (symbol == :Stepsize ) && return RecordStepsize ()
956978 (symbol == :Stop ) && return RecordStoppingReason ()
957979 (symbol == :Subsolver ) && return RecordSubsolver ()
0 commit comments