class Faker::Company
def weight_sum(array, weights)
def weight_sum(array, weights) sum = 0 (0..weights.size - 1).each do |index| sum += (array[index] * weights[index]) end sum end
def weight_sum(array, weights) sum = 0 (0..weights.size - 1).each do |index| sum += (array[index] * weights[index]) end sum end