Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/twss-classifier/naive-bayes.rb

Instance Method Summary collapse

Instance Method Details

#productObject



8
9
10
# File 'lib/twss-classifier/naive-bayes.rb', line 8

def product
  self.inject{ |s, t| s * t }
end

#sumObject



4
5
6
# File 'lib/twss-classifier/naive-bayes.rb', line 4

def sum
  self.inject{ |s, t| s + t }
end