Skip to content

Commit

Permalink
constructor changed names
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhavdixit02 committed Jan 6, 2024
1 parent cac58e1 commit 2e6b1f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/stats_state.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ and is passed to the callback function as the first argument.
- `original`: if the solver has its own state object then it is stored here
"""
struct OptimizationState{X, O, G, H, S}
iteration::Int
iter::Int
u::X
objective::O
grad::G
hess::H
original::S
end

function OptimizationState(; iteration = 0, u = nothing, objective = nothing,
gradient = nothing, hessian = nothing, solver_state = nothing)
OptimizationState(iteration, u, objective, gradient, hessian, solver_state)
function OptimizationState(; iter = 0, u = nothing, objective = nothing,

Check warning on line 53 in src/stats_state.jl

View check run for this annotation

Codecov / codecov/patch

src/stats_state.jl#L53

Added line #L53 was not covered by tests
grad = nothing, hess = nothing, original = nothing)
OptimizationState(iter, u, objective, grad, hess, original)

Check warning on line 55 in src/stats_state.jl

View check run for this annotation

Codecov / codecov/patch

src/stats_state.jl#L55

Added line #L55 was not covered by tests
end

0 comments on commit 2e6b1f4

Please sign in to comment.