Haha I guess I went back in time, then.
I think I was a bit unclear with my variables. I used x and z in both functions, knowing that they were safely in separate scopes, for mathematical clarity, not programmatic clarity. z is in the dual space of x in both cases. However,
x = Variable()
occurs in the function definition of conjugate(z), and
problem = maximize(Constant(x)*z-conjugate(z))
occurs in the function definition of biconjugate(x). I can rewrite biconjugate(x) as:
function biconjugate(w)
v = Variable()
problem = maximize(w*v-conjugate(v))
solve!(problem, SCSSolver(verbose=false))
return problem.optval
end
or even more clearly,
function biconjugate(w)
v = Variable()
u = Constant(w)
problem = maximize(u*v-conjugate(v))
solve!(problem, SCSSolver(verbose=false))
return problem.optval
end
still gives the same error. Since the Convex.jl documentation does not describe partially defined functions, but the Matlab cvx documentation does, maybe they’re not implemented in the Julia package?
I’m trying to test it out on Julia 1.0.