@@ -10,14 +10,8 @@ function Base.isone(p::AbstractPolynomial)
10
10
return isone (nterms (p)) && isone (first (terms (p)))
11
11
end
12
12
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
17
13
Base.:(== )(α:: Dict , x:: _APL ) = false
18
14
Base.:(== )(x:: _APL , α:: Dict ) = false
19
- Base.:(== )(α:: Nothing , x:: RationalPoly ) = false
20
- Base.:(== )(x:: RationalPoly , α:: Nothing ) = false
21
15
Base.:(== )(α:: Dict , x:: RationalPoly ) = false
22
16
Base.:(== )(x:: RationalPoly , α:: Dict ) = false
23
17
@@ -133,16 +127,16 @@ Base.:(==)(p::RationalPoly, q::RationalPoly) = p.num * q.den == q.num * p.den
133
127
# Solve ambiguity with (::PolyType, ::Any)
134
128
Base.:(== )(p:: _APL , q:: RationalPoly ) = p * q. den == q. num
135
129
Base.:(== )(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
138
132
function Base. isequal (p:: RationalPoly , q:: RationalPoly )
139
133
return isequal (p. num * q. den, q. num * p. den)
140
134
end
141
135
# Solve ambiguity with (::PolyType, ::Any)
142
136
Base. isequal (p:: _APL , q:: RationalPoly ) = isequal (p * q. den, q. num)
143
137
Base. 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)
146
140
147
141
# α could be a JuMP affine expression
148
142
isapproxzero (α; ztol:: Real = 0.0 ) = false
0 commit comments