Skip to content

Commit 6068efa

Browse files
🤖 Format .jl files
1 parent 8ba4c20 commit 6068efa

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/qpmodel.jl

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ end
1515

1616
isdense(data::QPDataCOO) = false
1717

18-
mutable struct QPData{T, S, M1 <: Union{AbstractMatrix{T}, AbstractLinearOperator{T}},
19-
M2 <: Union{AbstractMatrix{T}, AbstractLinearOperator{T}}} <: AbstractQPData{T, S}
18+
mutable struct QPData{
19+
T,
20+
S,
21+
M1 <: Union{AbstractMatrix{T}, AbstractLinearOperator{T}},
22+
M2 <: Union{AbstractMatrix{T}, AbstractLinearOperator{T}},
23+
} <: AbstractQPData{T, S}
2024
c0::T # constant term in objective
2125
c::S # linear term
2226
H::M1
@@ -25,7 +29,7 @@ end
2529

2630
isdense(data::QPData{T, S, M1, M2}) where {T, S, M1, M2} = M1 <: DenseMatrix || M2 <: DenseMatrix
2731

28-
function get_QPDataCOO(c0::T, c ::S, H::SparseMatrixCSC{T}, A::AbstractMatrix{T}) where {T, S}
32+
function get_QPDataCOO(c0::T, c::S, H::SparseMatrixCSC{T}, A::AbstractMatrix{T}) where {T, S}
2933
ncon, nvar = size(A)
3034
tril!(H)
3135
nnzh, Hrows, Hcols, Hvals = nnz(H), findnz(H)...
@@ -451,12 +455,12 @@ function slackdata(data::QPDataCOO{T}, meta::NLPModelMeta{T}, ns::Int) where {T}
451455
)
452456
end
453457

454-
function prodPermutedMinusOnes!(res, v, α, β::T, p::Vector{Int}) where T
458+
function prodPermutedMinusOnes!(res, v, α, β::T, p::Vector{Int}) where {T}
455459
res .= β == zero(T) ? zero(T) : β .* res
456460
res[p] .-= α .* v
457461
return res
458462
end
459-
function tprodPermutedMinusOnes!(res, v, α, β::T, p::Vector{Int}) where T
463+
function tprodPermutedMinusOnes!(res, v, α, β::T, p::Vector{Int}) where {T}
460464
res .= β == zero(T) ? zero(T) : β .* res
461465
res .-= @views α .* v[p]
462466
return res

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ end
132132
A = sprand(T, ncon, nvar, 0.4)
133133
c = rand(nvar)
134134
lvar = fill(-Inf, nvar)
135-
uvar = fill(0., nvar)
135+
uvar = fill(0.0, nvar)
136136
lcon = rand(ncon)
137137
ucon = lcon .+ 100.0
138138
qp = QuadraticModel(

0 commit comments

Comments
 (0)