similar 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  module Similar
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/similar.rb CHANGED
@@ -43,7 +43,7 @@ module Similar
43
43
  num / den.to_f
44
44
  end
45
45
 
46
- def self.euclidian_distance(a, b)
46
+ def self.euclidean_distance(a, b)
47
47
 
48
48
  # Add up the squares of all the differences
49
49
  # sum_of_squares = sum(
data/spec/similar_spec.rb CHANGED
@@ -23,11 +23,11 @@ describe Similar do
23
23
  lambda { Similar.pearson_score(a, b) }.should raise_exception(ArgumentError, "Arrays not of equal length")
24
24
  end
25
25
 
26
- it "should calculate euclidian distance score" do
26
+ it "should calculate euclidean distance score" do
27
27
  a = 5.0, 5.0, 5.0, 5.0, 5.0
28
28
  b = 4.0, 4.0, 4.0, 4.0, 4.0
29
29
 
30
- score = Similar.euclidian_distance(a, b)
30
+ score = Similar.euclidean_distance(a, b)
31
31
 
32
32
  score.should be_within(0.00001).of(0.16666666666666666)
33
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: similar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: