@@ -54,16 +54,9 @@ for (h, h_name) ∈ ((NormL0(λ), "l0"), (NormL1(λ), "l1"))
5454 args = solver_sym == :LM ? () : (NormLinf (1.0 ),)
5555 @test has_bounds (bpdn_nls2)
5656 out = solver (bpdn_nls2, h, args... , options, x0 = x0)
57- @test typeof (out. solution) == typeof (bpdn_nls2. meta. x0)
58- @test length (out. solution) == bpdn_nls2. meta. nvar
59- @test typeof (out. solver_specific[:Fhist ]) == typeof (out. solution)
60- @test typeof (out. solver_specific[:Hhist ]) == typeof (out. solution)
61- @test typeof (out. solver_specific[:SubsolverCounter ]) == Array{Int, 1 }
57+ @test typeof (out. solution) == typeof (bpdn. meta. x0)
58+ @test length (out. solution) == bpdn. meta. nvar
6259 @test typeof (out. dual_feas) == eltype (out. solution)
63- @test length (out. solver_specific[:Fhist ]) == length (out. solver_specific[:Hhist ])
64- @test length (out. solver_specific[:Fhist ]) == length (out. solver_specific[:SubsolverCounter ])
65- @test obj (bpdn_nls2, out. solution) == out. solver_specific[:Fhist ][end ]
66- @test h (out. solution) == out. solver_specific[:Hhist ][end ]
6760 @test out. status == :first_order
6861 end
6962 end
@@ -108,20 +101,9 @@ for (h, h_name) ∈ ((NormL0(λ), "l0"),)
108101 @test has_bounds (bpdn_nls2)
109102 LM_out =
110103 LM (bpdn_nls2, h, options, x0 = x0, subsolver = R2DH, subsolver_options = subsolver_options)
111- @test typeof (LM_out. solution) == typeof (bpdn_nls2. meta. x0)
112- @test length (LM_out. solution) == bpdn_nls2. meta. nvar
113- @test typeof (LM_out. solver_specific[:Fhist ]) == typeof (LM_out. solution)
114- @test typeof (LM_out. solver_specific[:Hhist ]) == typeof (LM_out. solution)
115- @test typeof (LM_out. solver_specific[:SubsolverCounter ]) == Array{Int, 1 }
116- @test typeof (LM_out. dual_feas) == eltype (LM_out. solution)
117- @test length (LM_out. solver_specific[:Fhist ]) == length (LM_out. solver_specific[:Hhist ])
118- @test length (LM_out. solver_specific[:Fhist ]) ==
119- length (LM_out. solver_specific[:SubsolverCounter ])
120- @test length (LM_out. solver_specific[:Fhist ]) == length (LM_out. solver_specific[:NLSGradHist ])
121- @test LM_out. solver_specific[:NLSGradHist ][end ] ==
122- bpdn_nls2. counters. neval_jprod_residual + bpdn_nls2. counters. neval_jtprod_residual - 1
123- @test obj (bpdn_nls2, LM_out. solution) == LM_out. solver_specific[:Fhist ][end ]
124- @test h (LM_out. solution) == LM_out. solver_specific[:Hhist ][end ]
104+ @test typeof (LM_out. solution) == typeof (bpdn. meta. x0)
105+ @test length (LM_out. solution) == bpdn. meta. nvar
106+ @test typeof (LM_out. dual_feas) == eltype (out. solution)
125107 @test LM_out. status == :first_order
126108 end
127109end
0 commit comments