We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64f1727 commit 504cefcCopy full SHA for 504cefc
1 file changed
src/jump_moi_overloads.jl
@@ -251,20 +251,6 @@ end
251
252
MOI.constant(func::IndexMappedFunction) = MOI.constant(func.func)
253
254
-# Support JuMP.coefficient on plain MOI functions returned by native solvers
255
-function JuMP.coefficient(
256
- func::MOI.ScalarAffineFunction{T},
257
- vi::MOI.VariableIndex,
258
-) where {T}
259
- coef = zero(T)
260
- for term in func.terms
261
- if term.variable == vi
262
- coef += term.coefficient
263
- end
264
265
- return coef
266
-end
267
-
268
function JuMP.coefficient(func::IndexMappedFunction, vi::MOI.VariableIndex)
269
return JuMP.coefficient(func.func, func.index_map[vi])
270
end
0 commit comments