Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ function _add!(
end
vectorized = set.vectors[row]::TriangleVectorization
matrix = vectorized.matrix
@assert isone(coef) # TODO multiply scaling
if !isone(coef)
matrix = mul_scaling(matrix, coef)
end
_add!(A, matrix)
end
end
Expand Down
2 changes: 2 additions & 0 deletions src/factorization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ function Factorization(factor::AbstractVector{T}, scaling::T) where {T}
return Factorization(factor, fill(scaling, tuple()))
end

mul_scaling(m::Factorization, coef) = Factorization(m.factor, m.scaling * coef)

left_factor(m::Factorization) = m.factor
right_factor(m::Factorization) = m.factor

Expand Down
Loading