Skip to content

Commit 2c756f3

Browse files
committed
Simplify check_bounds as suggested in issue #24
1 parent fd361c8 commit 2c756f3

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

test/runtests.jl

+1-7
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,7 @@ end
8585
xl = [-6.0, -6.0]
8686
xu = [ 6.0, 6.0]
8787

88-
function check_bounds(xl, x, xu)
89-
flag = true
90-
for (lᵢ, xᵢ, uᵢ) in zip(xl, x, xu)
91-
flag &= lᵢ xᵢ uᵢ
92-
end
93-
return flag
94-
end
88+
check_bounds(xl, x, xu) = all(xl .≤ x .≤ xu)
9589

9690
@testset "NEWUOA" begin
9791
println("\nNEWUOA:")

0 commit comments

Comments
 (0)