module Algebra::MIndex::Grevlex
Public Instance Methods
<=>(other)
click to toggle source
# File lib/algebra/m-index.rb, line 26 def <=>(other) s = (totdeg <=> other.totdeg) return s unless s.zero? n = [size, other.size].max (n - 1).downto 0 do |i| x = other[i] - self[i] return x unless x.zero? end 0 end