Method: Fairy::PSort::PPreSort#hashing
- Defined in:
- lib/fairy/node/p-sort.rb
#hashing(e) ⇒ Object
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/fairy/node/p-sort.rb', line 130 def hashing(e) if Import::CTLTOKEN_NULLVALUE === (key = @key_proc.call(e)) return end unless idx = @pvs.find_index{|pv| key < pv} idx = @pvs.size end #Log::debug(self, "#{@pvs.inspect}") #Log::debug(self, "#{idx}") export = @exports[idx] export.push e @counter[idx] += 1 end |