# Class for parsing sortIndex.out # # Written by k-fleak # class ParseSortIndex def initialize(filename) @input = open(filename, "r") @sortIndex = getData end def getSortIndex @sortIndex end private def getData cIndex = 0 ptmp = Hash.new() @input.each do |lines| unless lines.strip.empty? then lineArr = lines.strip.split atmp = Array.new ptmp[cIndex.to_i] = atmp lineArr.size.times do |i| ptmp[cIndex.to_i].push(lineArr[i].to_i) end cIndex += 1 end end return ptmp end end