Skip to content

Commit 3c79adf

Browse files
mohdibntarekabelsiqueira
authored andcommitted
define 5 arg hprod! for QuasiNewtonModel
1 parent e1662b6 commit 3c79adf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/quasi-newton.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ NLPModels.jac_structure!(nlp :: QuasiNewtonModel, rows :: AbstractVector{<: Inte
5656
# the following methods are affected by the Hessian approximation
5757
NLPModels.hess_op(nlp :: QuasiNewtonModel, x :: AbstractVector; kwargs...) = nlp.op
5858
NLPModels.hprod(nlp :: QuasiNewtonModel, x :: AbstractVector, v :: AbstractVector; kwargs...) = nlp.op * v
59+
function NLPModels.hprod!(nlp :: QuasiNewtonModel, x :: AbstractVector,
60+
y :: AbstractVector, v :: AbstractVector, Hv :: AbstractVector; kwargs...)
61+
return hprod!(nlp, x, v, Hv; kwargs...)
62+
end
5963
function NLPModels.hprod!(nlp :: QuasiNewtonModel, x :: AbstractVector,
6064
v :: AbstractVector, Hv :: AbstractVector; kwargs...)
6165
Hv[1:nlp.meta.nvar] .= nlp.op * v

0 commit comments

Comments
 (0)