Skip to content

Commit 1c1ea1e

Browse files
🤖 Format .jl files (#144)
Co-authored-by: tmigot <tmigot@users.noreply.github.com>
1 parent 23a1aff commit 1c1ea1e

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

test/sparse_hessian.jl

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,14 @@ dt = (Float32, Float64)
5656
n = 4
5757
x = ones(T, 4)
5858
nlp = ADNLPModel(
59-
x -> sum(100 * (x[i + 1] - x[i]^2)^2 + (x[i] - 1)^2 for i = 1:(n - 1)),
60-
x,
61-
hessian_backend = backend,
62-
name = "Extended Rosenbrock",
59+
x -> sum(100 * (x[i + 1] - x[i]^2)^2 + (x[i] - 1)^2 for i = 1:(n - 1)),
60+
x,
61+
hessian_backend = backend,
62+
name = "Extended Rosenbrock",
6363
)
6464
@test hess(nlp, x) == T[802 -400 0 0; -400 1002 -400 0; 0 -400 1002 -400; 0 0 -400 200]
65-
65+
6666
x = ones(T, 2)
67-
nlp = ADNLPModel(
68-
x -> x[1]^2 + x[1] * x[2],
69-
x,
70-
hessian_backend = backend,
71-
)
67+
nlp = ADNLPModel(x -> x[1]^2 + x[1] * x[2], x, hessian_backend = backend)
7268
@test hess(nlp, x) == T[2 1; 1 0]
7369
end

0 commit comments

Comments
 (0)