Sha256: 47191e6f72992148fe71eeed9f43b23651a3c3bf7e54716b9c43afc159f6f477
Contents?: true
Size: 245 Bytes
Versions: 2
Compression:
Stored size: 245 Bytes
Contents
module NumberCrusher def Epanechnikov(x = nil) function = Epanechnikov.new x ? function.call(x) : function end class Epanechnikov def call(x) return 0 unless (-1..1).include?(x) 0.75 * (1 - x**2) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
number_crusher-0.1.2 | lib/number_crusher/kernel/epanechnikov.rb |
number_crusher-0.1.1 | lib/number_crusher/kernel/epanechnikov.rb |