Skip to content

Commit 1214d91

Browse files
authored
Update functions.jl
1 parent 8d88d35 commit 1214d91

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/Utilities/functions.jl

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2207,14 +2207,7 @@ Returns the vector of scalar affine functions in the form of a
22072207
`MOI.VectorAffineFunction{T}`.
22082208
"""
22092209
function vectorize(funcs::AbstractVector{MOI.ScalarAffineFunction{T}}) where {T}
2210-
nterms =
2211-
mapreduce(func -> number_of_affine_terms(T, func), +, funcs, init = 0)
2212-
out_dim = mapreduce(func -> output_dim(T, func), +, funcs, init = 0)
2213-
terms = Vector{MOI.VectorAffineTerm{T}}(undef, nterms)
2214-
constant = zeros(T, out_dim)
2215-
fill_vector(terms, T, fill_terms, number_of_affine_terms, funcs)
2216-
fill_vector(constant, T, fill_constant, output_dim, funcs)
2217-
return MOI.VectorAffineFunction(terms, constant)
2210+
return MOI.VectorAffineFunction(funcs)
22182211
end
22192212

22202213
"""

0 commit comments

Comments
 (0)