Skip to content

Commit e4fd44f

Browse files
committed
Simplify conic
1 parent 062cc1f commit e4fd44f

File tree

3 files changed

+2
-130
lines changed

3 files changed

+2
-130
lines changed

src/MatrixOptInterface.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ end
6565

6666
@enum VariableType CONTINUOUS INTEGER BINARY
6767

68-
include("sparse_matrix.jl")
6968
include("conic_form.jl")
7069
include("matrix_input.jl")
7170
#include("change_form.jl")

src/sparse_matrix.jl

Lines changed: 0 additions & 108 deletions
This file was deleted.

test/conic_form.jl

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,6 @@ function _test_matrix_equal(A::SparseMatrixCSC, B::SparseMatrixCSC)
1111
@test A.colptr == B.colptr
1212
end
1313

14-
function _test_matrix_equal(
15-
A::MatOI.SparseMatrixCSRtoCSC{Tv,Ti,I},
16-
B::SparseMatrixCSC,
17-
) where {Tv,Ti,I}
18-
@test A.m == B.m
19-
@test A.n == B.n
20-
@test A.nzval B.nzval atol = ATOL rtol = RTOL
21-
if I <: MatOI.OneBasedIndexing
22-
@test A.rowval == B.rowval
23-
@test A.colptr == B.colptr
24-
else
25-
@test A.rowval == B.rowval .- 1
26-
@test A.colptr == B.colptr .- 1
27-
end
28-
sA = convert(typeof(B), A)
29-
@test typeof(sA) == typeof(B)
30-
return _test_matrix_equal(sA, B)
31-
end
32-
3314
# _psd1test: https://github.com/jump-dev/MathOptInterface.jl/blob/master/src/Test/contconic.jl#L2417
3415
function psd1(::Type{T}, ::Type{I}) where {T,I}
3516
# We use `MockOptimizer` to have indices xor'ed so that it tests that we don't assumes they are `1:n`.
@@ -93,7 +74,7 @@ function psd1(::Type{T}, ::Type{I}) where {T,I}
9374

9475
conic_form = MatOI.GeometricConicForm{
9576
T,
96-
MatOI.SparseMatrixCSRtoCSC{T,Int,I},
77+
MOI.Utilities.MutableSparseMatrixCSC{T,Int,I},
9778
Vector{T},
9879
}([
9980
MOI.PositiveSemidefiniteConeTriangle,
@@ -319,7 +300,7 @@ function psd2(
319300
end
320301

321302
@testset "PSD $T, $I" for T in [Float64, BigFloat],
322-
I in [MatOI.ZeroBasedIndexing, MatOI.OneBasedIndexing]
303+
I in [MOI.Utilities.ZeroBasedIndexing, MOI.Utilities.OneBasedIndexing]
323304

324305
psd1(T, I)
325306
psd2(T, I)

0 commit comments

Comments
 (0)