module Algebra::MIndex::V_lex
Public Instance Methods
<=>(other)
click to toggle source
# File lib/algebra/m-index.rb, line 39 def <=>(other) # 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 # p [111111111, self, other] 0 end