3535function _quadraticproblem (N:: Int ; mat:: AbstractArray{T,2} = spdiagm (float (1 : N)),
3636 x0:: AbstractVector{T} = ones (N),
3737 initial_x:: AbstractVector{T} = zeros (N),
38- name:: AbstractString = " Quadratic Diagonal ($N )" ) where T
38+ name:: AbstractString = " Quadratic Diagonal ($N )" ) where T <: Number
3939 # Note that _quadraticproblem is a special case of
4040 # _paraboloidproblem, where param.alpha = 0.0
4141 OptimizationProblem (name,
@@ -59,7 +59,6 @@ examples["Quadratic Diagonal"] = _quadraticproblem(100)
5959
6060immutable ParaboloidStruct{T, Tm <: AbstractArray{T,2} ,
6161 Tv <: AbstractArray{T} } <: Any where T<: Number
62-
6362 mat:: Tm
6463 vec:: Tv
6564 xt:: Tv
@@ -108,14 +107,14 @@ function _paraboloidproblem(N::Int; mat::AbstractArray{T,2} = spdiagm(float(1:N)
108107 x0:: AbstractVector{T} = ones (N),
109108 initial_x:: AbstractVector{T} = zeros (N),
110109 alpha:: T = 10.0 ,
111- name:: AbstractString = " Paraboloid Diagonal ($N )" ) where T
110+ name:: AbstractString = " Paraboloid Diagonal ($N )" ) where T <: Number
112111 OptimizationProblem (name,
113112 paraboloid,
114113 paraboloid_gradient!,
115114 paraboloid_fun_gradient!,
116115 paraboloid_hessian!,
117116 initial_x,
118- x0,
117+ x0, # x0 means the solution ...
119118 zero (T),
120119 true ,
121120 false ,
0 commit comments