-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Implementing #57: Real coefficients #58
Conversation
Codecov Report
@@ Coverage Diff @@
## master #58 +/- ##
=======================================
Coverage 98.93% 98.93%
=======================================
Files 20 20
Lines 1407 1407
=======================================
Hits 1392 1392
Misses 15 15 Continue to review full report at Codecov.
|
To stay efficient when using non-concrete types, better parameterize with a generic: mutable struct LinearVariables{T <: Real}
indices :: Vector{Int}
coeffs :: Vector{T}
end Instead of Vector{Real} |
When creating a LinearConstraint, either promote every real to the same type, or use different types for the different field types: mins :: Vector{TM1}
maxs :: Vector{TM2}
pre_mins :: Vector{TP1}
pre_maxs :: Vector{TP1l}
# etc |
Thanks for having a look: |
|
I think it is worth keeping, given the mention above that JuMP does not yet support generic numeric types |
What is the easiest way to get the common type of values? |
# on values
julia> promote(3, false)
(3, 0)
# on types
julia> promote_type(Float32, Float64)
Float64 |
Implemented:
|
Codecov Report
@@ Coverage Diff @@
## master #58 +/- ##
=======================================
Coverage 98.93% 98.93%
=======================================
Files 20 20
Lines 1407 1407
=======================================
Hits 1392 1392
Misses 15 15
Continue to review full report at Codecov.
|
Checked that there are no changes compared to master for killer sudoku regarding number of steps. The runtime might be slightly worse up but not significantly. |
If there are no other things @matbesancon I would merge this. |
Yup let's go with it :) |
anyway tests are passing, future things to do can be in other PRs |
First go of implementing real coefficients.