-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#750 - Allow unbounded ρ for Hyperplane/HalfSpace #940
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Something that we could add is a note on the algorithm behind It is a consequence of weak-duality in LPs: if the primal is unbounded then the dual is infeasible. Since there is only 1 constraint, the feasible set of the dual problem is |
Can't we just let: function σ(d::AbstractVector{N}, hp::Hyperplane{N})::N where {N<:Real}
v, unbounded = σ_helper(d, hp, error_unbounded=true)
return v
end EDIT: i just saw that this is precisely the function defined in lines 95-98 😄 I think it is good as is, no? For those cases that |
We also have an implementation for |
Done. |
Alright, i had forgotten that some components of the support vector of a If julia> d
3-element Array{Float64,1}:
-1.0
0.0
2.0
julia> dInf = map(x -> x != 0 ? sign(x) * Inf : 0.0, d)
3-element Array{Float64,1}:
-Inf
0.0
Inf |
See #750.
This PR brings only the support function.
Intuitively, it is clear what the support vector should look like, but I do not see the general formula.