diff options
author | Christoph Helma <helma@in-silico.de> | 2009-09-08 16:04:23 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2009-09-08 16:04:23 +0200 |
commit | 6a2c3f2100d030c30b7d8ac8c95dcece7edb040c (patch) | |
tree | c2e8069b3787b7ad2b90f062957d23eb12d955dd /lib/utils.rb | |
parent | 4d343f7c584ce09638005665b4ed2de718ff17a6 (diff) |
api separated into individual components, adapted for new webservice versions
Diffstat (limited to 'lib/utils.rb')
-rw-r--r-- | lib/utils.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/utils.rb b/lib/utils.rb new file mode 100644 index 0000000..2716f45 --- /dev/null +++ b/lib/utils.rb @@ -0,0 +1,11 @@ +module OpenTox + module Utils + + # gauss kernel + def self.gauss(sim, sigma = 0.3) + x = 1.0 - sim + Math.exp(-(x*x)/(2*sigma*sigma)) + end + + end +end |