Skip to content

Commit

Permalink
Relax signature
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieugomez committed Dec 3, 2018
1 parent c3d1cdc commit ed00ea2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/optimizer/dogleg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const INCREASE_THRESHOLD = 0.75
function optimize!(
anls::LeastSquaresProblemAllocated{Tx, Ty, Tf, TJ, Tg, Toptimizer, Tsolver};
x_tol::Number = 1e-8, f_tol::Number = 1e-8, g_tol::Number = 1e-8,
iterations::Integer = 1_000, Δ::Number = 1.0, store_trace = false, show_trace = false, show_every = 1, lower::Tx = Array{eltype(Tx)}(undef, 0), upper::Tx = Array{eltype(Tx)}(undef, 0)) where {Tx, Ty, Tf, TJ, Tg, Toptimizer <: AllocatedDogleg, Tsolver}
iterations::Integer = 1_000, Δ::Number = 1.0, store_trace = false, show_trace = false, show_every = 1, lower = Vector{eltype(Tx)}(undef, 0), upper = Vector{eltype(Tx)}(undef, 0)) where {Tx, Ty, Tf, TJ, Tg, Toptimizer <: AllocatedDogleg, Tsolver}

δgn, δgr, δx, dtd = anls.optimizer.δgn, anls.optimizer.δgr, anls.optimizer.δx, anls.optimizer.dtd
ftrial, fpredict = anls.optimizer.ftrial, anls.optimizer.fpredict
Expand Down
2 changes: 1 addition & 1 deletion src/optimizer/levenberg_marquardt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const MAX_DIAGONAL = 1e32
function optimize!(
anls::LeastSquaresProblemAllocated{Tx, Ty, Tf, TJ, Tg, Toptimizer, Tsolver};
x_tol::Number = 1e-8, f_tol::Number = 1e-8, g_tol::Number = 1e-8,
iterations::Integer = 1_000, Δ::Number = 10.0, store_trace = false, show_trace = false, show_every = 1, lower::Tx = Array{eltype(Tx)}(undef, 0), upper::Tx = Array{eltype(Tx)}(undef, 0)) where {Tx, Ty, Tf, TJ, Tg, Toptimizer <: AllocatedLevenbergMarquardt, Tsolver}
iterations::Integer = 1_000, Δ::Number = 10.0, store_trace = false, show_trace = false, show_every = 1, lower = Vector{eltype(Tx)}(undef, 0), upper = Vector{eltype(Tx)}(undef, 0)) where {Tx, Ty, Tf, TJ, Tg, Toptimizer <: AllocatedLevenbergMarquardt, Tsolver}

δx, dtd = anls.optimizer.δx, anls.optimizer.dtd
ftrial, fpredict = anls.optimizer.ftrial, anls.optimizer.fpredict
Expand Down
1 change: 1 addition & 0 deletions test/bounds.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ function rosenbrock(x)
end
x0 = zeros(2)
optimize(rosenbrock, x0, Dogleg(), lower = fill(0.0, length(x0)))
optimize(rosenbrock, x0, LevenbergMarquardt(), lower = fill(0.0, length(x0)))

0 comments on commit ed00ea2

Please sign in to comment.