File tree Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -307,21 +307,15 @@ ordering(p::AbstractPolynomialLike) = ordering(typeof(p))
307307# of x < y is equal to the result of Monomial(x) < Monomial(y)
308308# Without `Base.@pure`, TypedPolynomials allocates on Julia v1.6
309309# with `promote(x * y, x)`
310- Base. @pure function Base. cmp (
311- v1:: AbstractVariable ,
312- v2:: AbstractVariable ,
313- )
310+ Base. @pure function Base. cmp (v1:: AbstractVariable , v2:: AbstractVariable )
314311 return - cmp (name (v1), name (v2))
315312end
316313
317314function Base.:(== )(m1:: AbstractMonomialLike , m2:: AbstractMonomialLike )
318315 return iszero (cmp (m1, m2))
319316end
320317
321- function Base. cmp (
322- m1:: AbstractMonomial ,
323- m2:: AbstractMonomial ,
324- )
318+ function Base. cmp (m1:: AbstractMonomial , m2:: AbstractMonomial )
325319 s1, s2 = promote_variables (m1, m2)
326320 return cmp (ordering (m1)(), exponents (s1), exponents (s2))
327321end
345339# less than `b`, they are considered sort of equal.
346340_cmp_coefficient (a, b) = 0
347341
348- function Base. cmp (
349- t1:: AbstractTermLike ,
350- t2:: AbstractTermLike ,
351- )
342+ function Base. cmp (t1:: AbstractTermLike , t2:: AbstractTermLike )
352343 Δ = cmp (monomial (t1), monomial (t2))
353344 if iszero (Δ)
354345 return _cmp_coefficient (coefficient (t1), coefficient (t2))
Original file line number Diff line number Diff line change 146146 rinvlex = Reverse{InverseLexOrder}
147147 grevlex = Graded{rinvlex}
148148 @static if Symbol (Mod) == :DynamicPolynomials
149- @testset " compare $M " for M in [
150- lex,
151- grlex,
152- rinvlex,
153- grevlex,
154- ]
149+ @testset " compare $M " for M in [lex, grlex, rinvlex, grevlex]
155150 Mod. @polyvar x y z monomial_order = M
156151 # [CLO13, p. 58]
157152 sgn = (M == lex || M == rinvlex) ? - 1 : 1
You can’t perform that action at this time.
0 commit comments