Skip to content

Commit

Permalink
objcons call objcons! (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmigot authored Aug 12, 2024
1 parent d78e2d0 commit 82100be
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/nlp/api.jl
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,8 @@ Evaluate ``f(x)`` and ``c(x)`` at `x`.
"""
function objcons(nlp::AbstractNLPModel{T, S}, x::AbstractVector) where {T, S}
@lencheck nlp.meta.nvar x
f = obj(nlp, x)
c = cons(nlp, x)
return f, c
c = S(undef, nlp.meta.ncon)
return objcons!(nlp, x, c)
end

"""
Expand Down

0 comments on commit 82100be

Please sign in to comment.