Skip to content

Commit

Permalink
Remove MonomialVector in mergemonovec
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Apr 19, 2019
1 parent 4fa677e commit 99caa3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/monovec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -236,5 +236,6 @@ function MP.mergemonovec(ms::Vector{MonomialVector{C}}) where {C}
end
end
end
X
# There is no duplicate by construction
return MonomialVector{C}(buildZvarsvec(PolyVar{C}, X)...)
end
4 changes: 3 additions & 1 deletion test/mono.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@
σ, Y = sortmonovec(X)
@test σ == 1:length(X)
@test Y === X
@test mergemonovec([X, X]) == X
XX = @inferred mergemonovec([X, X])
@test XX isa MonomialVector{true}
@test X == XX

@test 2 != MonomialVector([x, y], 1)
@test x != MonomialVector([x, y], 1)
Expand Down

0 comments on commit 99caa3b

Please sign in to comment.