diff --git a/src/utils.jl b/src/utils.jl index dc515e9..b5488ec 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -68,10 +68,7 @@ end Base.length(block::QPBlockData) = length(block.bound_type) -function _set_objective( - block::QPBlockData{T}, - f::MOI.VariableIndex, -) where {T} +function _set_objective(block::QPBlockData{T}, f::MOI.VariableIndex) where {T} push!(block.objective_linear_columns, f.value) push!(block.objective_linear_coefficients, one(T)) return zero(T) @@ -130,17 +127,11 @@ function MOI.set( return end -function MOI.get( - block::QPBlockData{T}, - ::MOI.ObjectiveFunctionType, -) where {T} +function MOI.get(block::QPBlockData{T}, ::MOI.ObjectiveFunctionType) where {T} return _function_type_to_set(T, block.objective_type) end -function MOI.get( - block::QPBlockData{T}, - ::MOI.ObjectiveFunction{F}, -) where {T,F} +function MOI.get(block::QPBlockData{T}, ::MOI.ObjectiveFunction{F}) where {T,F} affine_terms = MOI.ScalarAffineTerm{T}[ MOI.ScalarAffineTerm( block.objective_linear_coefficients[i],