Skip to content

Commit 33cce72

Browse files
committed
🤖 Format .jl files
1 parent 080e2ef commit 33cce72

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

src/LMModel.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ where `J` is the Jacobian of `F` at `xk`, represented via matrix-free operations
1616
1717
`σ > 0` is a regularization parameter and `v` is a vector of the same size as `F(xk)` used for intermediary computations.
1818
"""
19-
mutable struct LMModel{T <: Real, V <: AbstractVector{T}, Jac <: Union{AbstractMatrix, AbstractLinearOperator}} <:
20-
AbstractNLPModel{T, V}
19+
mutable struct LMModel{
20+
T <: Real,
21+
V <: AbstractVector{T},
22+
Jac <: Union{AbstractMatrix, AbstractLinearOperator},
23+
} <: AbstractNLPModel{T, V}
2124
J::Jac
2225
F::V
2326
v::V

test/test_allocs.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,14 @@ end
7878

7979
@testset "NLS allocs" begin
8080
for (h, h_name) ((NormL0(λ), "l0"),)
81-
for (solver, solver_name) ((:LMSolver, "LM"), )
81+
for (solver, solver_name) ((:LMSolver, "LM"),)
8282
@testset "$(solver_name)" begin
8383
solver_name == "LM" && continue #FIXME
8484
reg_nlp = RegularizedNLPModel(bpdn_nls, h)
8585
solver = eval(solver)(reg_nlp)
8686
stats = RegularizedExecutionStats(reg_nlp)
87-
@test @wrappedallocs(solve!(solver, reg_nlp, stats, σk = 1.0, atol = 1e-6, rtol = 1e-6)) == 0
87+
@test @wrappedallocs(solve!(solver, reg_nlp, stats, σk = 1.0, atol = 1e-6, rtol = 1e-6)) ==
88+
0
8889
@test stats.status == :first_order
8990
end
9091
end

test/test_bounds.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ for (h, h_name) ∈ ((NormL0(λ), "l0"),)
9292
@testset "bpdn-with-bounds-ls-LM-$(h_name)-R2DH" begin
9393
x0 = zeros(bpdn_nls2.meta.nvar)
9494
@test has_bounds(bpdn_nls2)
95-
LM_out =
96-
LM(bpdn_nls2, h, options, x0 = x0, subsolver = R2DHSolver)#, subsolver_options = subsolver_options)
95+
LM_out = LM(bpdn_nls2, h, options, x0 = x0, subsolver = R2DHSolver)#, subsolver_options = subsolver_options)
9796
@test typeof(LM_out.solution) == typeof(bpdn.meta.x0)
9897
@test length(LM_out.solution) == bpdn.meta.nvar
9998
@test typeof(LM_out.dual_feas) == eltype(LM_out.solution)

0 commit comments

Comments
 (0)