Skip to content

Commit b1a7710

Browse files
authored
Reorder fields of MatrixScalarQuadratic (#198)
1 parent ac0e98f commit b1a7710

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ function sparse_array_representation(func::MOI.ScalarAffineFunction, num_variabl
4343
)
4444
end
4545
struct SparseScalarQuadraticFunction{T}
46-
affine_terms::SparseVector{T,Int64}
4746
quadratic_terms::SparseMatrixCSC{T,Int64}
47+
affine_terms::SparseVector{T,Int64}
4848
constant::T
4949
end
5050
function sparse_array_representation(func::MOI.ScalarQuadraticFunction, num_variables, index_map)
5151
return SparseScalarQuadraticFunction(
52-
sparse_array_representation(func.affine_terms, num_variables, index_map),
5352
sparse_array_representation(func.quadratic_terms, num_variables, index_map),
53+
sparse_array_representation(func.affine_terms, num_variables, index_map),
5454
func.constant,
5555
)
5656
end

0 commit comments

Comments
 (0)