Skip to content

Commit c2bbcbe

Browse files
committed
Relax type in MOI NLP evaluator
1 parent ca06e9a commit c2bbcbe

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

lib/OptimizationMOI/src/OptimizationMOI.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ using LinearAlgebra
1515

1616
const MOI = MathOptInterface
1717

18-
const DenseOrSparse{T} = Union{Matrix{T}, SparseMatrixCSC{T}}
19-
2018
function SciMLBase.requiresgradient(opt::Union{
2119
MOI.AbstractOptimizer, MOI.OptimizerWithAttributes})
2220
true

lib/OptimizationMOI/src/nlp.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
mutable struct MOIOptimizationNLPEvaluator{T, F <: OptimizationFunction, RC, LB, UB,
2-
I,
3-
JT <: DenseOrSparse{T}, HT <: DenseOrSparse{T},
4-
CHT <: DenseOrSparse{T}, S, CB} <:
2+
I, S, CB} <:
53
MOI.AbstractNLPEvaluator
64
f::F
75
reinit_cache::RC
@@ -11,9 +9,9 @@ mutable struct MOIOptimizationNLPEvaluator{T, F <: OptimizationFunction, RC, LB,
119
lcons::Vector{T}
1210
ucons::Vector{T}
1311
sense::S
14-
J::JT
15-
H::HT
16-
cons_H::Vector{CHT}
12+
J::AbstractMatrix{T}
13+
H::AbstractMatrix{T}
14+
cons_H::Vector{AbstractMatrix{T}}
1715
callback::CB
1816
iteration::Int
1917
obj_expr::Union{Expr, Nothing}

0 commit comments

Comments
 (0)