module Toji::Processing::SoakedRice
Public Instance Methods
soaked()
click to toggle source
浸漬米総重量
# File lib/toji/processing/soaked_rice.rb, line 31 def soaked (elements || []).map(&:soaked).sum end
soaking_ratio()
click to toggle source
浸漬米吸水率
# File lib/toji/processing/soaked_rice.rb, line 36 def soaking_ratio (soaked.to_f - weight.to_f) / weight.to_f end
soaking_ratio_sd()
click to toggle source
浸漬米吸水率の標準偏差
# File lib/toji/processing/soaked_rice.rb, line 41 def soaking_ratio_sd mean = soaking_ratio samples = (elements || []).map(&:soaking_ratio) length = samples.length.to_f Math.sqrt(samples.map{|sample| (sample - mean) ** 2}.sum / length) end
weight()
click to toggle source
白米総重量
# File lib/toji/processing/soaked_rice.rb, line 26 def weight (elements || []).map(&:weight).sum end