Skip to content

Commit 52ad3e9

Browse files
committed
Small fixes and adapt tests
1 parent 2637011 commit 52ad3e9

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/interface/interface.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ By default this method continues to call [`solve!`](@ref).
4242
"""
4343
function solve(problem::Problem, algorithm::Algorithm; kwargs...)
4444
state = initialize_state(problem, algorithm; kwargs...)
45-
return solve!(state, problem, algorithm; kwargs...)
45+
return solve!(problem, algorithm, state; kwargs...)
4646
end
4747

4848
@doc """

src/interface/state.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The default assumes that the current iteration is stored in `state.iteration`.
5858
"""
5959
function increment!(state::State)
6060
state.iteration += 1
61-
return s
61+
return state
6262
end
6363

6464
"""

test/newton.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ function initialize_state(problem::RootFindingProblem, algorithm::NewtonMethod)
3030
return NewtonState(0, 1.0, scs) # hardcode initial guess to 1.0
3131
end
3232
function initialize_state!(
33-
state::NewtonState,
3433
problem::RootFindingProblem,
3534
algorithm::NewtonMethod,
35+
state::NewtonState,
3636
)
3737
state.iteration = 0
3838
state.iterate = 1.0

0 commit comments

Comments
 (0)