Skip to content

Commit 9e1d4f0

Browse files
committed
toint
1 parent 9661813 commit 9e1d4f0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ADNLPProblems/toint.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
export toint
22

33
function toint(; n::Int = default_nvar, kwargs...)
4-
return toint(Val(:nlp); n = n, kwargs...)
4+
return toint(Val(:nlp); n = n, kwargs...)
55
end
66

77
function toint(::Val{:nlp}; n::Int = default_nvar, type::Type{T} = Float64, kwargs...) where {T}
8-
function f(x; n = length(x))
9-
return sum((cos(x[i]) - x[i]^2)^2 for i = 1:n)
10-
end
11-
x0 = zeros(T, n)
12-
return ADNLPModels.ADNLPModel(f, x0, name = "toint", minimize = true, kwargs...)
8+
function f(x; n = length(x))
9+
return sum((cos(x[i]) - x[i]^2)^2 for i 1:n)
10+
end
11+
x0 = zeros(T, n)
12+
return ADNLPModels.ADNLPModel(f, x0, name = "toint", minimize = true, kwargs...)
1313
end

0 commit comments

Comments
 (0)