361
361
362
362
linobj (qp:: AbstractQuadraticModel , args... ) = qp. data. c
363
363
364
- function NLPModels. objgrad! (qp:: QuadraticModel , x:: AbstractVector , g:: AbstractVector )
364
+ function NLPModels. objgrad! (qp:: AbstractQuadraticModel , x:: AbstractVector , g:: AbstractVector )
365
365
NLPModels. increment! (qp, :neval_obj )
366
366
NLPModels. increment! (qp, :neval_grad )
367
367
if qp. meta. islp
@@ -375,7 +375,7 @@ function NLPModels.objgrad!(qp::QuadraticModel, x::AbstractVector, g::AbstractVe
375
375
return f, g
376
376
end
377
377
378
- function NLPModels. obj (qp:: QuadraticModel , x:: AbstractVector )
378
+ function NLPModels. obj (qp:: AbstractQuadraticModel , x:: AbstractVector )
379
379
NLPModels. increment! (qp, :neval_obj )
380
380
if qp. meta. islp
381
381
f = qp. data. c0 + dot (qp. data. c, x)
@@ -386,7 +386,7 @@ function NLPModels.obj(qp::QuadraticModel, x::AbstractVector)
386
386
return f
387
387
end
388
388
389
- function NLPModels. grad! (qp:: QuadraticModel , x:: AbstractVector , g:: AbstractVector )
389
+ function NLPModels. grad! (qp:: AbstractQuadraticModel , x:: AbstractVector , g:: AbstractVector )
390
390
NLPModels. increment! (qp, :neval_grad )
391
391
if qp. meta. islp
392
392
g .= qp. data. c
@@ -409,7 +409,7 @@ function fill_structure!(S::SparseMatrixCSC, rows, cols)
409
409
end
410
410
411
411
function NLPModels. hess_structure! (
412
- qp:: QuadraticModel {T, S, M1} ,
412
+ qp:: AbstractQuadraticModel {T, S, M1} ,
413
413
rows:: AbstractVector{<:Integer} ,
414
414
cols:: AbstractVector{<:Integer} ,
415
415
) where {T, S, M1 <: SparseMatrixCOO }
@@ -421,7 +421,7 @@ function NLPModels.hess_structure!(
421
421
end
422
422
423
423
function NLPModels. hess_structure! (
424
- qp:: QuadraticModel {T, S, M1} ,
424
+ qp:: AbstractQuadraticModel {T, S, M1} ,
425
425
rows:: AbstractVector{<:Integer} ,
426
426
cols:: AbstractVector{<:Integer} ,
427
427
) where {T, S, M1 <: SparseMatrixCSC }
@@ -432,7 +432,7 @@ function NLPModels.hess_structure!(
432
432
end
433
433
434
434
function NLPModels. hess_structure! (
435
- qp:: QuadraticModel {T, S, M1} ,
435
+ qp:: AbstractQuadraticModel {T, S, M1} ,
436
436
rows:: AbstractVector{<:Integer} ,
437
437
cols:: AbstractVector{<:Integer} ,
438
438
) where {T, S, M1 <: Matrix }
@@ -458,7 +458,7 @@ function fill_coord!(S::SparseMatrixCSC, vals, obj_weight)
458
458
end
459
459
460
460
function NLPModels. hess_coord! (
461
- qp:: QuadraticModel {T, S, M1} ,
461
+ qp:: AbstractQuadraticModel {T, S, M1} ,
462
462
x:: AbstractVector{T} ,
463
463
vals:: AbstractVector{T} ;
464
464
obj_weight:: Real = one (eltype (x)),
@@ -471,7 +471,7 @@ function NLPModels.hess_coord!(
471
471
end
472
472
473
473
function NLPModels. hess_coord! (
474
- qp:: QuadraticModel {T, S, M1} ,
474
+ qp:: AbstractQuadraticModel {T, S, M1} ,
475
475
x:: AbstractVector{T} ,
476
476
vals:: AbstractVector{T} ;
477
477
obj_weight:: Real = one (eltype (x)),
@@ -484,7 +484,7 @@ function NLPModels.hess_coord!(
484
484
end
485
485
486
486
function NLPModels. hess_coord! (
487
- qp:: QuadraticModel {T, S, M1} ,
487
+ qp:: AbstractQuadraticModel {T, S, M1} ,
488
488
x:: AbstractVector{T} ,
489
489
vals:: AbstractVector{T} ;
490
490
obj_weight:: Real = one (eltype (x)),
@@ -511,7 +511,7 @@ NLPModels.hess_coord!(
511
511
) = hess_coord! (qp, x, vals, obj_weight = obj_weight)
512
512
513
513
function NLPModels. jac_lin_structure! (
514
- qp:: QuadraticModel {T, S, M1, M2} ,
514
+ qp:: AbstractQuadraticModell {T, S, M1, M2} ,
515
515
rows:: AbstractVector{<:Integer} ,
516
516
cols:: AbstractVector{<:Integer} ,
517
517
) where {T, S, M1, M2 <: SparseMatrixCOO }
@@ -608,7 +608,7 @@ function NLPModels.cons_lin!(qp::AbstractQuadraticModel, x::AbstractVector, c::A
608
608
end
609
609
610
610
function NLPModels. hprod! (
611
- qp:: QuadraticModel ,
611
+ qp:: AbstractQuadraticModel ,
612
612
x:: AbstractVector ,
613
613
v:: AbstractVector ,
614
614
Hv:: AbstractVector ;
0 commit comments