@@ -13,7 +13,7 @@ mutable struct QPData{
13
13
A:: M2
14
14
end
15
15
16
- QPData (c0, c, H, A) = QPData (c0, c, similar (c), H, A)
16
+ QPData (c0, c, H, A; lp :: Bool = false ) = QPData (c0, c, lp ? similar (c) : similar (c, 0 ), H, A)
17
17
isdense (data:: QPData{T, S, M1, M2} ) where {T, S, M1, M2} = M1 <: DenseMatrix || M2 <: DenseMatrix
18
18
19
19
function Base. convert (
@@ -29,7 +29,7 @@ Base.convert(
29
29
data:: QPData{T, S, M1, M2} ,
30
30
) where {T, S, M1 <: SparseMatrixCOO , M2 <: SparseMatrixCOO , MCOO <: SparseMatrixCOO{T} } = data
31
31
32
- abstract type AbstractQuadraticModel{T, S} <: AbstractNLPModel{T, S} end
32
+ abstract type AbstractQuadraticModel{T, S, M1, M2 } <: AbstractNLPModel{T, S} end
33
33
34
34
"""
35
35
qp = QuadraticModel(c, Hrows, Hcols, Hvals; Arows = Arows, Acols = Acols, Avals = Avals,
@@ -137,7 +137,7 @@ function QuadraticModel(
137
137
nln_nnzj = 0 ,
138
138
nnzh = nnzh,
139
139
lin = 1 : ncon,
140
- islp = (nnzh == 0 ) ;
140
+ islp = false ;
141
141
kwargs... ,
142
142
),
143
143
Counters (),
@@ -192,7 +192,7 @@ function QuadraticModel(
192
192
nln_nnzj = 0 ,
193
193
nnzh = nnzh,
194
194
lin = 1 : ncon,
195
- islp = (nnzh == 0 ) ;
195
+ islp = false ;
196
196
kwargs... ,
197
197
),
198
198
Counters (),
0 commit comments