# File lib/classifier/extensions/vector.rb, line 16 def magnitude sumsqs = 0.0 self.size.times do |i| sumsqs += self[i] ** 2.0 end Math.sqrt(sumsqs) end