Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- version: '1'
os: ubuntu-latest
arch: x64
- version: '1.6'
- version: '1.10'
os: ubuntu-latest
arch: x64
- version: '1'
Expand Down
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ uuid = "2f4eb8e6-3e35-4ae4-8c7a-f3d7d9bf20ed"
version = "0.1.0"

[deps]
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[compat]
FillArrays = "1.15.0"
MathOptInterface = "1"
Comment thread
blegat marked this conversation as resolved.
Outdated
julia = "1.6"
julia = "1.10"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# MatrixOptInterface.jl

> [!WARNING]
> Needs the development version of MathOptInterface

[![Build Status](https://github.com/jump-dev/MatrixOptInterface.jl/workflows/CI/badge.svg)](https://github.com/jump-dev/MatrixOptInterface.jl/actions)
[![Coverage](https://codecov.io/gh/jump-dev/MatrixOptInterface.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/jump-dev/MatrixOptInterface.jl)

Expand Down
3 changes: 2 additions & 1 deletion src/MatrixOptInterface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
module MatrixOptInterface

using LinearAlgebra, SparseArrays
import FillArrays
using MathOptInterface
const MOI = MathOptInterface
const MOIU = MathOptInterface.Utilities
Expand Down Expand Up @@ -67,6 +68,6 @@ end
include("sparse_matrix.jl")
include("conic_form.jl")
include("matrix_input.jl")
include("change_form.jl")
#include("change_form.jl")

end
40 changes: 0 additions & 40 deletions src/change_form.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,6 @@ function change_form(::Type{LPForm{T,AT,VT}}, lp::LPForm) where {T,AT,VT}
)
end

function change_form(
::Type{LPForm{T,AT,VT}},
lp::LPStandardForm{T},
) where {T,AT,VT}
return LPForm{T,AT,VT}(
lp.sense,
lp.c,
lp.A,
lp.b,
lp.b,
fill(zero(T), length(lp.c)),
fill(typemax(T), length(lp.c)),
)
end

function change_form(
::Type{LPForm{T,AT,VT}},
lp::LPGeometricForm{T},
Expand Down Expand Up @@ -125,31 +110,6 @@ function change_form(
return change_form(LPGeometricForm{T,AT,VT}, temp_lp)
end

function change_form(
::Type{LPStandardForm{T,AT,VT}},
lp::LPStandardForm,
) where {T,AT,VT}
return LPStandardForm(lp.sense, lp.c, lp.A, lp.b)
end

function change_form(
::Type{LPStandardForm{T,AT,VT}},
lp::LPGeometricForm{T},
) where {T,AT,VT}
new_A = hcat(lp.A, -lp.A, AT(I, length(lp.b), length(lp.b)))
new_c = vcat(lp.c, -lp.c, fill(0.0, length(lp.b)))
return LPStandardForm{T,AT,VT}(lp.sense, new_c, new_A, copy(lp.b))
end

function change_form(
::Type{LPStandardForm{T,AT,VT}},
lp::F,
) where {T,AT,VT,F<:AbstractLPForm{T}}
temp_lp = change_form(LPForm{T,AT,VT}, lp)
new_lp = change_form(LPGeometricForm{T,AT,VT}, temp_lp)
return change_form(LPStandardForm{T,AT,VT}, new_lp)
end

function change_form(
::Type{LPSolverForm{T,AT,VT}},
lp::LPSolverForm,
Expand Down
Loading