Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/MatrixOptInterface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ end

@enum VariableType CONTINUOUS INTEGER BINARY

include("sparse_matrix.jl")
include("conic_form.jl")
include("matrix_input.jl")
#include("change_form.jl")
Expand Down
108 changes: 0 additions & 108 deletions src/sparse_matrix.jl

This file was deleted.

23 changes: 2 additions & 21 deletions test/conic_form.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,6 @@ function _test_matrix_equal(A::SparseMatrixCSC, B::SparseMatrixCSC)
@test A.colptr == B.colptr
end

function _test_matrix_equal(
A::MatOI.SparseMatrixCSRtoCSC{Tv,Ti,I},
B::SparseMatrixCSC,
) where {Tv,Ti,I}
@test A.m == B.m
@test A.n == B.n
@test A.nzval ≈ B.nzval atol = ATOL rtol = RTOL
if I <: MatOI.OneBasedIndexing
@test A.rowval == B.rowval
@test A.colptr == B.colptr
else
@test A.rowval == B.rowval .- 1
@test A.colptr == B.colptr .- 1
end
sA = convert(typeof(B), A)
@test typeof(sA) == typeof(B)
return _test_matrix_equal(sA, B)
end

# _psd1test: https://github.com/jump-dev/MathOptInterface.jl/blob/master/src/Test/contconic.jl#L2417
function psd1(::Type{T}, ::Type{I}) where {T,I}
# We use `MockOptimizer` to have indices xor'ed so that it tests that we don't assumes they are `1:n`.
Expand Down Expand Up @@ -93,7 +74,7 @@ function psd1(::Type{T}, ::Type{I}) where {T,I}

conic_form = MatOI.GeometricConicForm{
T,
MatOI.SparseMatrixCSRtoCSC{T,Int,I},
MOI.Utilities.MutableSparseMatrixCSC{T,Int,I},
Vector{T},
}([
MOI.PositiveSemidefiniteConeTriangle,
Expand Down Expand Up @@ -319,7 +300,7 @@ function psd2(
end

@testset "PSD $T, $I" for T in [Float64, BigFloat],
I in [MatOI.ZeroBasedIndexing, MatOI.OneBasedIndexing]
I in [MOI.Utilities.ZeroBasedIndexing, MOI.Utilities.OneBasedIndexing]

psd1(T, I)
psd2(T, I)
Expand Down
Loading