@@ -2,7 +2,6 @@ export R2DH
22
33"""
44 R2DH(nlp, h, options)
5- R2DH(f, ∇f!, h, options, x0)
65
76A second-order quadratic regularization method for the problem
87
@@ -33,11 +32,7 @@ where φ(s ; xₖ) = f(xₖ) + ∇f(xₖ)ᵀs + ½ sᵀ(Dₖ + σₖI)s is a qua
3332The objective and gradient of `nlp` will be accessed.
3433
3534### Return values
36-
37- * `xk`: the final iterate
38- * `Fobj_hist`: an array with the history of values of the smooth objective
39- * `Hobj_hist`: an array with the history of values of the nonsmooth objective
40- * `Complex_hist`: an array with the history of number of inner iterations.
35+ The value returned is a `GenericExecutionStats`, see `SolverCore.jl`.
4136"""
4237function R2DH (
4338 nlp:: AbstractDiagonalQNModel{R, S} ,
@@ -74,6 +69,41 @@ function R2DH(
7469 return stats
7570 end
7671
72+ """
73+ R2DH(f, ∇f!, h, options, x0)
74+
75+ A second calling form for `R2DH` where the objective and gradient are passed as arguments.
76+
77+ ### Arguments
78+
79+ * `f::Function`: the objective function
80+ * `∇f!::Function`: the gradient function
81+ * `h`: a regularizer such as those defined in ProximalOperators
82+ * `D`: Diagonal quasi-Newton operator.
83+ * `options::ROSolverOptions`: a structure containing algorithmic parameters
84+ * `x0::AbstractVector`: an initial guess
85+
86+ ### Keyword Arguments
87+
88+ * `Mmonotone::Int`: number of previous values of the objective to consider for the non-monotone variant (default: 6).
89+ * `selected::AbstractVector{<:Integer}`: subset of variables to which `h` is applied (default `1:length(x0)`).
90+
91+ ### Return values
92+
93+ * `xk`: the final iterate
94+ * `k`: the number of iterations
95+ * `outdict`: a dictionary containing the following fields:
96+ * `Fhist`: an array with the history of values of the smooth objective
97+ * `Hhist`: an array with the history of values of the nonsmooth objective
98+ * `Time_hist`: an array with the history of elapsed times
99+ * `Chist`: an array with the history of number of inner iterations
100+ * `NonSmooth`: the nonsmooth term
101+ * `status`: the status of the solver either `:first_order`, `:max_iter`, `:max_time` or `:exception`
102+ * `fk`: the value of the smooth objective at the final iterate
103+ * `hk`: the value of the nonsmooth objective at the final iterate
104+ * `sqrt_ξ_νInv`: the square root of the ratio of the nonsmooth term to the regularization parameter
105+ * `elapsed_time`: the elapsed time
106+ """
77107function R2DH (
78108 f:: F ,
79109 ∇f!:: G ,
0 commit comments