Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Jul 22, 2024
1 parent 44091b2 commit 6765ee6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ const _SETS = Union{

function _canonical_quadratic_reduction(f::MOI.ScalarQuadraticFunction)
if !MOI.Utilities.is_canonical(f)
f = copy(f)
f = MOI.Utilities.canonicalize!(f)
f = MOI.Utilities.canonicalize!(copy(f))
end
I = Cint[term.variable_1.value - 1 for term in f.quadratic_terms]
J = Cint[term.variable_2.value - 1 for term in f.quadratic_terms]
I = Cint[_c_column(term.variable_1) for term in f.quadratic_terms]
J = Cint[_c_column(term.variable_2) for term in f.quadratic_terms]
V = Cdouble[term.coefficient for term in f.quadratic_terms]
for i in 1:length(V)
if I[i] == J[i]
Expand Down

0 comments on commit 6765ee6

Please sign in to comment.