Skip to content

Commit

Permalink
Cleanup MOI wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Dec 14, 2023
1 parent 9617bbb commit b3518a7
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -627,18 +627,10 @@ MOI.get(optimizer::Optimizer, ::DualSlackMatrix) = ZBlockMat(optimizer)
function block(optimizer::Optimizer, ci::MOI.ConstraintIndex{MOI.VectorOfVariables})
return optimizer.varmap[ci.value][1]
end
function dimension(optimizer::Optimizer, ci::MOI.ConstraintIndex{MOI.VectorOfVariables})
blockdim = optimizer.blockdims[block(optimizer, ci)]
if blockdim < 0
return -blockdim
else
return MOI.dimension(MOI.PositiveSemidefiniteConeTriangle(blockdim))
end
end
function vectorize_block(M, blk::Integer, s::Type{MOI.Nonnegatives})
return diag(block(M, blk))
end
function vectorize_block(M::AbstractMatrix{Cdouble}, blk::Integer, s::Type{MOI.PositiveSemidefiniteConeTriangle}) where T
function vectorize_block(M::AbstractMatrix{Cdouble}, blk::Integer, s::Type{MOI.PositiveSemidefiniteConeTriangle})

Check warning on line 633 in src/MOI_wrapper.jl

View check run for this annotation

Codecov / codecov/patch

src/MOI_wrapper.jl#L633

Added line #L633 was not covered by tests
B = block(M, blk)
d = LinearAlgebra.checksquare(B)
n = MOI.dimension(MOI.PositiveSemidefiniteConeTriangle(d))
Expand Down

0 comments on commit b3518a7

Please sign in to comment.