buncher 0.0.1

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.
data/.autotest ADDED
@@ -0,0 +1,25 @@
1
+ # -*- ruby -*-
2
+
3
+ require "autotest/restart"
4
+
5
+ # Autotest.add_hook :initialize do |at|
6
+ # at.testlib = "minitest/unit"
7
+ #
8
+ # at.extra_files << "../some/external/dependency.rb"
9
+ #
10
+ # at.libs << ":../some/external"
11
+ #
12
+ # at.add_exception "vendor"
13
+ #
14
+ # at.add_mapping(/dependency.rb/) do |f, _|
15
+ # at.files_matching(/test_.*rb$/)
16
+ # end
17
+ #
18
+ # %w(TestA TestB).each do |klass|
19
+ # at.extra_class_map[klass] = "test/test_misc.rb"
20
+ # end
21
+ # end
22
+
23
+ # Autotest.add_hook :run_command do |at|
24
+ # system "rake build"
25
+ # end
data/.gemtest ADDED
File without changes
data/History.txt ADDED
@@ -0,0 +1,6 @@
1
+ === 1.0.0 / 2015-04-18
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+
data/Manifest.txt ADDED
@@ -0,0 +1,8 @@
1
+ .autotest
2
+ History.txt
3
+ Manifest.txt
4
+ README.txt
5
+ Rakefile
6
+ bin/buncher
7
+ lib/buncher.rb
8
+ test/test_buncher.rb
data/README.txt ADDED
@@ -0,0 +1,70 @@
1
+ = buncher
2
+
3
+ home :: https://github.com/robmathews/buncher
4
+ code :: https://github.com/robmathews/buncher
5
+ rdoc :: https://github.com/robmathews/buncher
6
+ bugs :: https://github.com/robmathews/buncher
7
+
8
+ == DESCRIPTION:
9
+
10
+ buncher implements a variant of the popular k-means clustering algorithm as a native ruby extension.
11
+ The variant uses the technique described in http://www.ee.columbia.edu/~dpwe/papers/PhamDN05-kmeans.pdf
12
+ in order to find the best value of K.
13
+
14
+ == FEATURES/PROBLEMS:
15
+
16
+ * native C implementation is fast and handles large datasets
17
+ * doesn't require knowledge of K.
18
+ * only ruby 1.9.3-p547 and higher
19
+ * no idea about ruby 2.2
20
+
21
+ == SYNOPSIS:
22
+
23
+ each point is represented as an array
24
+ the dataset is represented as an array of arrays
25
+ given an array of arrays
26
+
27
+ == REQUIREMENTS:
28
+
29
+ * usual requirements to install a native gem
30
+
31
+ == INSTALL:
32
+
33
+ Add this to the Gemfile:
34
+ gem buncher
35
+ and then
36
+ bundle install
37
+
38
+ == DEVELOPERS:
39
+
40
+ After checking out the source, run:
41
+
42
+ $ rake newb
43
+
44
+ This task will install any missing dependencies, run the tests/specs,
45
+ and generate the RDoc.
46
+
47
+ == LICENSE:
48
+
49
+ (The MIT License)
50
+
51
+ Copyright (c) 2015
52
+
53
+ Permission is hereby granted, free of charge, to any person obtaining
54
+ a copy of this software and associated documentation files (the
55
+ 'Software'), to deal in the Software without restriction, including
56
+ without limitation the rights to use, copy, modify, merge, publish,
57
+ distribute, sublicense, and/or sell copies of the Software, and to
58
+ permit persons to whom the Software is furnished to do so, subject to
59
+ the following conditions:
60
+
61
+ The above copyright notice and this permission notice shall be
62
+ included in all copies or substantial portions of the Software.
63
+
64
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
65
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
66
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
67
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
68
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
69
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
70
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,21 @@
1
+ # -*- ruby -*-
2
+
3
+ require "rubygems"
4
+ require "hoe"
5
+
6
+ Hoe.plugin :compiler
7
+ # Hoe.plugin :gem_prelude_sucks
8
+ # Hoe.plugin :inline
9
+ Hoe.plugin :minitest
10
+ # Hoe.plugin :racc
11
+ # Hoe.plugin :rcov
12
+ # Hoe.plugin :rdoc
13
+
14
+ Hoe.spec "buncher" do
15
+ developer("Robert Mathews", "rob@justsoftwareconsulting.com")
16
+ self.extra_dev_deps
17
+
18
+ license "MIT" # this should match the license in the README
19
+ end
20
+
21
+ # vim: syntax=ruby
@@ -0,0 +1,11 @@
1
+ # Loads mkmf which is used to make makefiles for Ruby extensions
2
+ require 'mkmf'
3
+
4
+ # Give it a name
5
+ extension_name = 'buncher'
6
+
7
+ # The destination
8
+ dir_config(extension_name)
9
+
10
+ # Do the work
11
+ create_makefile(extension_name)
data/lib/buncher.rb ADDED
@@ -0,0 +1,4 @@
1
+ require 'buncher/buncher'
2
+ class Buncher
3
+ VERSION = "0.0.1"
4
+ end
@@ -0,0 +1,9 @@
1
+ gem "minitest"
2
+ require "minitest/autorun"
3
+ require "buncher"
4
+
5
+ class TestBuncher < Minitest::Test
6
+ def test_sanity
7
+ assert_equal 'hello world', Buncher.hello_world
8
+ end
9
+ end
metadata ADDED
@@ -0,0 +1,131 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: buncher
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Robert Mathews
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2015-04-18 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: minitest
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '5.4'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '5.4'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rdoc
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '4.0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '4.0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rake-compiler
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: '0.7'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '0.7'
62
+ - !ruby/object:Gem::Dependency
63
+ name: hoe
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: '3.13'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: '3.13'
78
+ description: ! 'buncher implements a variant of the popular k-means clustering algorithm
79
+ as a native ruby extension.
80
+
81
+ The variant uses the technique described in http://www.ee.columbia.edu/~dpwe/papers/PhamDN05-kmeans.pdf
82
+
83
+ in order to find the best value of K.'
84
+ email:
85
+ - rob@justsoftwareconsulting.com
86
+ executables: []
87
+ extensions:
88
+ - ext/buncher/extconf.rb
89
+ extra_rdoc_files:
90
+ - History.txt
91
+ - Manifest.txt
92
+ - README.txt
93
+ files:
94
+ - .autotest
95
+ - History.txt
96
+ - Manifest.txt
97
+ - README.txt
98
+ - Rakefile
99
+ - lib/buncher.rb
100
+ - test/test_buncher.rb
101
+ - ext/buncher/extconf.rb
102
+ - .gemtest
103
+ homepage: https://github.com/robmathews/buncher
104
+ licenses:
105
+ - MIT
106
+ post_install_message:
107
+ rdoc_options:
108
+ - --main
109
+ - README.txt
110
+ require_paths:
111
+ - lib
112
+ required_ruby_version: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ required_rubygems_version: !ruby/object:Gem::Requirement
119
+ none: false
120
+ requirements:
121
+ - - ! '>='
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ requirements: []
125
+ rubyforge_project:
126
+ rubygems_version: 1.8.23.2
127
+ signing_key:
128
+ specification_version: 3
129
+ summary: buncher implements a variant of the popular k-means clustering algorithm
130
+ as a native ruby extension
131
+ test_files: []