Skip to content

Conversation

@odow
Copy link
Contributor

@odow odow commented Jun 29, 2022

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.

@odow odow changed the title Remove acronyms in the MOI wrapper Style improvements for the MOI wrapper Jun 29, 2022
using LinearAlgebra: rmul!
import LinearAlgebra
import MathOptInterface
import SparseArrays
Copy link
Collaborator

@blegat blegat Jun 30, 2022

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

upper(::MOI.Nonnegatives, i::Int) = Inf
upper(::MOI.Nonpositives, i::Int) = 0.0

# TODO: just use ∈ on 0.7 (allocates on 0.6):
Copy link
Collaborator

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

@matbesancon
Copy link
Contributor

what was missing on this one?

@blegat
Copy link
Collaborator

blegat commented Aug 1, 2023

I think a rebase should be enough my comments were pretty minor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants