Skip to content

Commit 47b1a87

Browse files
authored
Fix term multiplication for CondensedMatterSOS (#252)
1 parent 53696e7 commit 47b1a87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/operators.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,9 @@ MA.operate!(::typeof(*), m1::AbstractMonomial, m2::AbstractMonomialLike) = map_e
267267
Base.:*(m1::AbstractMonomialLike, m2::AbstractMonomialLike) = map_exponents(+, m1, m2)
268268
#Base.:*(m1::AbstractMonomialLike, m2::AbstractMonomialLike) = *(monomial(m1), monomial(m2))
269269

270-
Base.:*(m::AbstractMonomialLike, t::AbstractTermLike) = term(coefficient(t), m * monomial(t))
271-
Base.:*(t::AbstractTermLike, m::AbstractMonomialLike) = term(coefficient(t), monomial(t) * m)
272-
Base.:*(t1::AbstractTermLike, t2::AbstractTermLike) = term(coefficient(t1) * coefficient(t2), monomial(t1) * monomial(t2))
270+
Base.:*(m::AbstractMonomialLike, t::AbstractTermLike) = left_constant_mult(coefficient(t), m * monomial(t))
271+
Base.:*(t::AbstractTermLike, m::AbstractMonomialLike) = left_constant_mult(coefficient(t), monomial(t) * m)
272+
Base.:*(t1::AbstractTermLike, t2::AbstractTermLike) = left_constant_mult(coefficient(t1) * coefficient(t2), monomial(t1) * monomial(t2))
273273

274274
MA.operate!(::typeof(*), p::APL, t::AbstractMonomialLike) = map_exponents!(+, p, t)
275275
Base.:*(p::APL, t::AbstractMonomialLike) = map_exponents(+, p, t)

0 commit comments

Comments
 (0)