Skip to content

Commit 504cefc

Browse files
committed
Remove type piracy
1 parent 64f1727 commit 504cefc

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

src/jump_moi_overloads.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -251,20 +251,6 @@ end
251251

252252
MOI.constant(func::IndexMappedFunction) = MOI.constant(func.func)
253253

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-
end
265-
return coef
266-
end
267-
268254
function JuMP.coefficient(func::IndexMappedFunction, vi::MOI.VariableIndex)
269255
return JuMP.coefficient(func.func, func.index_map[vi])
270256
end

0 commit comments

Comments
 (0)