summaryrefslogtreecommitdiff
path: root/lib/algorithm.rb
diff options
context:
space:
mode:
authormr <mr@mrautenberg.de>2011-04-06 09:59:04 +0200
committermr <mr@mrautenberg.de>2011-04-06 10:06:06 +0200
commita12f491fc42b058168fb43b32e8769694e821658 (patch)
tree73b603818b1ef5cb99bcf96c68d4afb81abd44ba /lib/algorithm.rb
parentc0bef2dc83d2ce1fea6434ca73586d49865bb810 (diff)
A&A fixes, code cleaning
Diffstat (limited to 'lib/algorithm.rb')
-rw-r--r--lib/algorithm.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/algorithm.rb b/lib/algorithm.rb
index c8cb116..167c964 100644
--- a/lib/algorithm.rb
+++ b/lib/algorithm.rb
@@ -246,7 +246,7 @@ module OpenTox
# Gauss kernel
# @return [Float]
def self.gauss(x, sigma = 0.3)
- d = 1.0 - x
+ d = 1.0 - x.to_f
Math.exp(-(d*d)/(2*sigma*sigma))
end