@@ -13,7 +13,7 @@ mutable struct QPData{
1313 A:: M2
1414end
1515
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)
1717isdense (data:: QPData{T, S, M1, M2} ) where {T, S, M1, M2} = M1 <: DenseMatrix || M2 <: DenseMatrix
1818
1919function Base. convert (
@@ -29,7 +29,7 @@ Base.convert(
2929 data:: QPData{T, S, M1, M2} ,
3030) where {T, S, M1 <: SparseMatrixCOO , M2 <: SparseMatrixCOO , MCOO <: SparseMatrixCOO{T} } = data
3131
32- abstract type AbstractQuadraticModel{T, S} <: AbstractNLPModel{T, S} end
32+ abstract type AbstractQuadraticModel{T, S, M1, M2 } <: AbstractNLPModel{T, S} end
3333
3434"""
3535 qp = QuadraticModel(c, Hrows, Hcols, Hvals; Arows = Arows, Acols = Acols, Avals = Avals,
@@ -137,7 +137,7 @@ function QuadraticModel(
137137 nln_nnzj = 0 ,
138138 nnzh = nnzh,
139139 lin = 1 : ncon,
140- islp = (nnzh == 0 ) ;
140+ islp = false ;
141141 kwargs... ,
142142 ),
143143 Counters (),
@@ -192,7 +192,7 @@ function QuadraticModel(
192192 nln_nnzj = 0 ,
193193 nnzh = nnzh,
194194 lin = 1 : ncon,
195- islp = (nnzh == 0 ) ;
195+ islp = false ;
196196 kwargs... ,
197197 ),
198198 Counters (),
0 commit comments