Module: Measurable

Extended by:
Chebyshev, Cosine, Euclidean, Hamming, Haversine, KullbackLeibler, Levenshtein, Maxmin, Minkowski, Tanimoto
Defined in:
lib/measurable.rb,
lib/measurable/cosine.rb,
lib/measurable/maxmin.rb,
lib/measurable/hamming.rb,
lib/measurable/jaccard.rb,
lib/measurable/version.rb,
lib/measurable/tanimoto.rb,
lib/measurable/chebyshev.rb,
lib/measurable/euclidean.rb,
lib/measurable/haversine.rb,
lib/measurable/minkowski.rb,
lib/measurable/levenshtein.rb,
lib/measurable/kullback_leibler.rb

Defined Under Namespace

Modules: Chebyshev, Cosine, Euclidean, Hamming, Haversine, Jaccard, KullbackLeibler, Levenshtein, Maxmin, Minkowski, Tanimoto

Constant Summary

RAD_PER_DEG =

PI / 180 degrees.

Math::PI / 180
VERSION =

:nodoc:

"0.0.9"
EARTH_RADIUS_IN_MILES =

Earth radius in miles.

3956
EARTH_RADIUS_IN_KILOMETERS =

Earth radius in kilometers. Some algorithms use 6367.

6371
EARTH_RADIUS =

The great circle distance returned will be in whatever units R is in. Provides

{
  :miles => EARTH_RADIUS_IN_MILES,
  :km => EARTH_RADIUS_IN_KILOMETERS,
  :feet => EARTH_RADIUS_IN_MILES * 5282,
  :meters => EARTH_RADIUS_IN_KILOMETERS * 1000
}

Method Summary

Methods included from KullbackLeibler

kullback_leibler

Methods included from Levenshtein

levenshtein

Methods included from Minkowski

extended, included, minkowski

Methods included from Haversine

haversine

Methods included from Euclidean

euclidean, euclidean_squared

Methods included from Chebyshev

chebyshev

Methods included from Tanimoto

extended, included, tanimoto

Methods included from Hamming

hamming

Methods included from Maxmin

maxmin

Methods included from Cosine

cosine_distance, cosine_similarity, extended, included