lib/hmm.rb
# abstracting out some array element operations for readability
abstracting out some array element operations for readability
abstracting out some array element operations for readability
def log(subject)
			if subject.is_a?(Array) or subject.is_a?(NArray)
				return subject.collect{|n| NMath::log n}
			else
				return log(Array[subject])[0]
			end
		end
def log ( subject ) if subject . is_a? ( Array ) or subject . is_a? ( NArray ) return subject . collect { | n | NMath :: log n } else return log ( Array [ subject ] ) [ 0 ] end end
abstracting out some array element operations for readability
abstracting out some array element operations for readability
subject
<not_specific>