-
Notifications
You must be signed in to change notification settings - Fork 25
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
Style improvements for the MOI wrapper #115
base: master
Are you sure you want to change the base?
Conversation
using LinearAlgebra: rmul! | ||
import LinearAlgebra | ||
import MathOptInterface | ||
import SparseArrays |
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.
I prefer importing stdlib first, maybe this could be in the style guide. In general, I even load any dependency first so I do some sort of topological sort
lower(::MOI.Nonpositives, i::Int) = -Inf | ||
upper(::MOI.Zeros, i::Int) = 0.0 | ||
upper(::MOI.Nonnegatives, i::Int) = Inf | ||
upper(::MOI.Nonpositives, i::Int) = 0.0 | ||
|
||
# TODO: just use ∈ on 0.7 (allocates on 0.6): |
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.
This function can be removed according to this comment
what was missing on this one? |
I think a rebase should be enough my comments were pretty minor |
This PR starts to tidy up the MOI wrapper.
I've tried to keep this fairly surface level. I haven't re-arranged any code blocks to keep the diff easier to read. I'll do that in another PR.