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