Skip to content

Conversation

guilhermebodin
Copy link
Collaborator

This way we can query the dual coefficients for the matrix A^T using set_dot, and it is easier to extend to new cones

@guilhermebodin
Copy link
Collaborator Author

This closes #26

function set_dot(i::Int, s::MOI.AbstractVectorSet, T::DataType)
vec = zeros(T, MOI.dimension(s))
vec[i] = one(T)
return MOIU.set_dot(vec, vec, s)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should modify MOIU.set_dot to accept AbstractArray so that vec can be passed as a sparse vector

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if this is super simple, I can try it tomorrow

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Add a comment to change this once jump-dev/MathOptInterface.jl#805 is merged and released.

@codecov-io
Copy link

codecov-io commented Jul 23, 2019

Codecov Report

Merging #28 into master will decrease coverage by 0.31%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
- Coverage   94.56%   94.24%   -0.32%     
==========================================
  Files          10       10              
  Lines         239      226      -13     
==========================================
- Hits          226      213      -13     
  Misses         13       13
Impacted Files Coverage Δ
src/dual_model_variables.jl 100% <ø> (ø) ⬆️
src/dual_equality_constraints.jl 100% <100%> (ø) ⬆️

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 b6ec63b...5616070. Read the comment docs.

@guilhermebodin guilhermebodin merged commit ed36cb8 into master Jul 24, 2019
@guilhermebodin guilhermebodin deleted the set_dot branch July 25, 2019 02:41
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.

3 participants