Skip to content
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

Rename m field of VariableRef to model. #1483

Merged
merged 2 commits into from Sep 23, 2018
Merged

Rename m field of VariableRef to model. #1483

merged 2 commits into from Sep 23, 2018

Conversation

mlubin
Copy link
Member

@mlubin mlubin commented Sep 22, 2018

For style compliance. Also switch to owner_model method instead of
accessing the field directly.

The definition of VariableRef is now:

struct VariableRef <: AbstractVariableRef
    model::Model
    index::MOI.VariableIndex
end

which is much nicer IMO than

struct VariableRef <: AbstractVariableRef
    m::Model
    index::MOIVAR
end

We should do the same for ConstraintRef after this goes through.

For style compliance. Also switch to `owner_model` method instead of
accessing the field directly.
@codecov
Copy link

codecov bot commented Sep 22, 2018

Codecov Report

Merging #1483 into master will increase coverage by 0.42%.
The diff coverage is 94.02%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1483      +/-   ##
==========================================
+ Coverage   88.12%   88.54%   +0.42%     
==========================================
  Files          27       27              
  Lines        3654     3668      +14     
==========================================
+ Hits         3220     3248      +28     
+ Misses        434      420      -14
Impacted Files Coverage Δ
src/JuMP.jl 75.67% <100%> (+0.22%) ⬆️
src/parse_nlp.jl 87.67% <66.66%> (-0.61%) ⬇️
src/variables.jl 93.45% <94.64%> (ø) ⬆️
src/nlp.jl 84.95% <0%> (+2.83%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4dc96e...19d0db4. Read the comment docs.

src/variables.jl Outdated Show resolved Hide resolved
@mlubin mlubin merged commit 47ef41e into master Sep 23, 2018
@mlubin mlubin deleted the ml/variablerefactor branch September 23, 2018 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants