k_means_pp 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee4560276d76bfbbd4c0185ce2841dc63d58f691
4
- data.tar.gz: be6e6af6d42800a6f7f8bf59ab590e8dc7de8318
3
+ metadata.gz: de62fbdd258e4e910cafe5b1c3eabbc006fc7bdf
4
+ data.tar.gz: 27edf10754d005cfd6a75d27edaf956429d5460c
5
5
  SHA512:
6
- metadata.gz: b9637a304158454f25592ce2a7e3391a3beeb124c01b36ad140f8c94c6bdbe606318d14a260d795bca3e3983e73d53abd8ef4f5a56ab843cdfd9b32bae5fc6df
7
- data.tar.gz: 53141d801f3a6ea60124d21b47448e258f4c9c62705601d6f03846009ca692fffed4b81b66c67bd39ceb0759ff9ff556f69881ccb49f6b6ede121527e026d339
6
+ metadata.gz: 0832f023aa270b89f37f407265cab8c6e3d98d00778035cf7a25f56355397d2f94c29da2f1bad6594455887718ff1908008e37828caa29015c3afc7d11aa26af
7
+ data.tar.gz: 1e3173dccef69f459b9791713f3ad1a9d73d6a57842b5672b5fe29fc3c33b38e957b0cec1d56cd60f914d4d0371a4dd9de9249554890c38a2997c8dbe39781ef
@@ -16,5 +16,6 @@ notifications:
16
16
  on_success: change
17
17
  on_failure: always
18
18
 
19
+ before_install: "gem install bundler -v 1.10.5"
19
20
  install: "bundle --jobs 4"
20
21
  script: "bundle exec rspec"
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ require 'bundler/gem_tasks'
2
+
1
3
  task default: :combo
2
4
 
3
5
  desc 'Run tests, rubocop and generate documentation'
@@ -23,14 +23,14 @@ Gem::Specification.new do |spec|
23
23
  spec.require_paths = ['lib']
24
24
 
25
25
  # System
26
- spec.add_development_dependency 'bundler', '~> 1.7'
26
+ spec.add_development_dependency 'bundler', '~> 1.10'
27
27
 
28
28
  # Test
29
- spec.add_development_dependency 'rspec', '~> 3.2'
29
+ spec.add_development_dependency 'rspec', '~> 3.3'
30
30
  spec.add_development_dependency 'simplecov', '~> 0.10'
31
31
 
32
32
  # Code style, debugging, docs
33
- spec.add_development_dependency 'rubocop', '~> 0.31'
33
+ spec.add_development_dependency 'rubocop', '~> 0.32'
34
34
  spec.add_development_dependency 'pry', '~> 0.10'
35
35
  spec.add_development_dependency 'yard', '~> 0.8'
36
36
  spec.add_development_dependency 'rake', '~> 10.4'
@@ -165,7 +165,7 @@ class KMeansPP
165
165
  centroids[0...centroid_i]
166
166
  )
167
167
  distances[point_i] = distance
168
- distances_sum += distance
168
+ distances_sum += distance
169
169
  end
170
170
 
171
171
  # Randomly cut it.
@@ -23,8 +23,8 @@ class KMeansPP
23
23
  # A string representation of the cluster.
24
24
  def to_s
25
25
  o = ''
26
- o << "Cluster #{ centroid }: [\n"
27
- points.each { |p| o << " #{ p },\n" }
26
+ o << "Cluster #{centroid}: [\n"
27
+ points.each { |p| o << " #{p},\n" }
28
28
  o << "]\n"
29
29
  o
30
30
  end
@@ -25,7 +25,7 @@ class KMeansPP
25
25
 
26
26
  # A string representation of the point.
27
27
  def to_s
28
- "(#{ x }, #{ y })"
28
+ "(#{x}, #{y})"
29
29
  end
30
30
  end
31
31
 
@@ -80,8 +80,8 @@ class KMeansPP
80
80
  # @param point [Point]
81
81
  def add(point)
82
82
  self.counter += 1
83
- self.x += point.x
84
- self.y += point.y
83
+ self.x += point.x
84
+ self.y += point.y
85
85
  end
86
86
 
87
87
  # At this point X and Y properties will contain sums of all the point
@@ -1,4 +1,4 @@
1
1
  class KMeansPP
2
2
  # Version number, happy now?
3
- VERSION = '0.0.3'
3
+ VERSION = '0.0.4'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: k_means_pp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oldrich Vetesnik
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-05-22 00:00:00.000000000 Z
11
+ date: 2015-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.7'
19
+ version: '1.10'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.7'
26
+ version: '1.10'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.2'
33
+ version: '3.3'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '3.2'
40
+ version: '3.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: simplecov
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.31'
61
+ version: '0.32'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.31'
68
+ version: '0.32'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  version: '0'
159
159
  requirements: []
160
160
  rubyforge_project:
161
- rubygems_version: 2.4.6
161
+ rubygems_version: 2.4.8
162
162
  signing_key:
163
163
  specification_version: 4
164
164
  summary: K-means++ Algorithm Implementation.