Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Jul 17, 2022
1 parent a28c7ef commit c54dffc
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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],
Expand Down

0 comments on commit c54dffc

Please sign in to comment.