From 91781c18c8c2c33783f30e64172f11ae9180a6d1 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 16 Mar 2011 15:40:46 +0100 Subject: conversion to float in Math.gauss --- lib/algorithm.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3