Method: MyMatrix#makeHash

Defined in:
lib/mymatrix.rb

#makeHash(fromColName, toColName) ⇒ Object

fromColName => toColNameのハッシュを作成する。fromColNameの値が同じだとtoColNameが上書きされるので使いにくいと思われる。



646
647
648
649
650
651
652
653
654
# File 'lib/mymatrix.rb', line 646

def makeHash(fromColName, toColName)
	out = Hash.new
	@mx.each do |row|
		from = getValue(row, fromColName)
		to = getValue(row, toColName)
		out[from] = to
	end
	return out
end