@@ -10,14 +10,8 @@ function Base.isone(p::AbstractPolynomial)
1010 return isone (nterms (p)) && isone (first (terms (p)))
1111end
1212
13- # See https://github.com/blegat/MultivariatePolynomials.jl/issues/22
14- # avoids the call to be transfered to left_constant_eq
15- Base.:(== )(α:: Nothing , x:: _APL ) = false
16- Base.:(== )(x:: _APL , α:: Nothing ) = false
1713Base.:(== )(α:: Dict , x:: _APL ) = false
1814Base.:(== )(x:: _APL , α:: Dict ) = false
19- Base.:(== )(α:: Nothing , x:: RationalPoly ) = false
20- Base.:(== )(x:: RationalPoly , α:: Nothing ) = false
2115Base.:(== )(α:: Dict , x:: RationalPoly ) = false
2216Base.:(== )(x:: RationalPoly , α:: Dict ) = false
2317
@@ -133,16 +127,16 @@ Base.:(==)(p::RationalPoly, q::RationalPoly) = p.num * q.den == q.num * p.den
133127# Solve ambiguity with (::PolyType, ::Any)
134128Base.:(== )(p:: _APL , q:: RationalPoly ) = p * q. den == q. num
135129Base.:(== )(q:: RationalPoly , p:: _APL ) = p == q
136- Base.:(== )(α, q:: RationalPoly ) = α * q. den == q. num
137- Base.:(== )(q:: RationalPoly , α) = α == q
130+ Base.:(== )(α:: _Constant , q:: RationalPoly ) = α * q. den == q. num
131+ Base.:(== )(q:: RationalPoly , α:: _Constant ) = α == q
138132function Base. isequal (p:: RationalPoly , q:: RationalPoly )
139133 return isequal (p. num * q. den, q. num * p. den)
140134end
141135# Solve ambiguity with (::PolyType, ::Any)
142136Base. isequal (p:: _APL , q:: RationalPoly ) = isequal (p * q. den, q. num)
143137Base. isequal (q:: RationalPoly , p:: _APL ) = isequal (p, q)
144- Base. isequal (α, q:: RationalPoly ) = isequal (α * q. den, q. num)
145- Base. isequal (q:: RationalPoly , α) = isequal (α, q)
138+ Base. isequal (α:: _Constant , q:: RationalPoly ) = isequal (α * q. den, q. num)
139+ Base. isequal (q:: RationalPoly , α:: _Constant ) = isequal (α, q)
146140
147141# α could be a JuMP affine expression
148142isapproxzero (α; ztol:: Real = 0.0 ) = false
0 commit comments