frequent-algorithm 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 89e3696841e7c22693c58221b03a793c1f5d94d5
4
+ data.tar.gz: bed42bcc5345a79a588a3c1ab594520ca67c3d40
5
+ SHA512:
6
+ metadata.gz: 45d1ee2b0a585529e06935735b6a53be8a88a45548c659589bc148f1b9024bac19fba9f8f3e9dbebf8d733dd9fa113e6b3451cad6b3ee1a61d2e1988e2b657c4
7
+ data.tar.gz: 6100d5530291ec757aed6329f3f680fced9a0a7ce8b8ca974bcac72102aa3882f7ef72b47a86c318dcdf7d5ae12671a1e9c87af124f6914b75a602860056cd5c
data/.yardopts ADDED
@@ -0,0 +1,7 @@
1
+ --no-private
2
+ --readme README.md
3
+ --markup markdown
4
+ --markup-provider rdiscount
5
+ -
6
+ LICENSE
7
+ CHANGELOG
data/CHANGELOG ADDED
File without changes
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Willie Tong, Brooke M. Fujita
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
data/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # frequent-algorithm
2
+
3
+ `frequent-algorithm` is a Ruby implementation of the FREQUENT algorithm
4
+ for identifying frequent items in a data stream in sliding windows.
5
+ Please refer to [Identifying Frequent Items in Sliding Windows over On-Line
6
+ Packet Streams](http://erikdemaine.org/papers/SlidingWindow_IMC2003/), by
7
+ Golab, DeHaan, Demaine, López-Ortiz and Munro (2003).
8
+
9
+ ## Getting Started
10
+
11
+ Bacon ipsum dolor amet short loin flank swine ham hock tail. T-bone biltong
12
+ beef shoulder salami, leberkas pork chop ribeye pork belly ground round. Filet
13
+ mignon pork chop spare ribs brisket pastrami picanha bacon, biltong beef ribs
14
+ corned beef ham hock tail. Meatloaf kielbasa turducken, salami chuck beef ribs
15
+ venison hamburger t-bone landjaeger pork chop drumstick sausage bacon.
16
+
17
+
18
+ ## Usage
19
+
20
+ require 'frequent-algorithm'
21
+
22
+ ## Development
23
+
24
+ The development of this gem requires the following:
25
+
26
+ * [Ruby 2.0 or greater](https://www.ruby-lang.org/en/)
27
+ * [rubygems](https://rubygems.org/pages/download)
28
+ * [`bundler`](https://github.com/bundler/bundler)
29
+ * [`rake`](https://github.com/ruby/rake)
30
+ * [`yard`](https://rubygems.org/gems/yard) (documentation)
31
+ * [`rdiscount`](https://rubygems.org/gems/rdiscount) (Markdown)
32
+
33
+ ### Documentation
34
+
35
+ `frequent-algorithm` uses [`yard`](https://rubygems.org/gems/yard) and
36
+ [`rdiscount`](https://rubygems.org/gems/rdiscount) for Markdown documentation.
37
+ Check out [Getting Started with
38
+ Yard](http://www.rubydoc.info/gems/yard/file/docs/GettingStarted.md).
39
+
40
+ ### Build
41
+
42
+ Development, testing and release of this rubygem uses the following
43
+ `rake` commands:
44
+
45
+
46
+ rake build # Build frequent-algorithm-n.n.n.gem into the pkg directory
47
+ rake clean # Remove any temporary products
48
+ rake clobber # Remove any generated file
49
+ rake install # Build and install frequent-algorithm-n.n.n.gem into system gems
50
+ rake release # Create tag vn.n.n and build and push frequent-algorithm-n.n.n.gem to Rubygems
51
+ rake test # Execute unit tests
52
+
53
+
54
+ ### Unit Testing
55
+
56
+ `frequent-algorithm` uses
57
+ [`MiniTest::Unit`](https://github.com/seattlerb/minitest) for
58
+ unit testing.
59
+
60
+
61
+ ### Release
62
+
63
+ Please refer to Publishing To Rubygems.org in the
64
+ [Rubygems Guide](http://guides.rubygems.org/make-your-own-gem/).
65
+
66
+
67
+ ## License
68
+
69
+ frequent-algorithm is provided under the terms of the MIT license.
70
+
71
+ Copyright © 2015, Willie Tong & Brooke M. Fujita. All rights reserved.
@@ -0,0 +1,27 @@
1
+ require 'frequent/algorithm'
2
+
3
+ =begin
4
+
5
+ The MIT License (MIT)
6
+
7
+ Copyright (c) 2015 Willie Tong, Brooke M. Fujita
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a
10
+ copy of this software and associated documentation files (the "Software"),
11
+ to deal in the Software without restriction, including without limitation
12
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
13
+ and/or sell copies of the Software, and to permit persons to whom the
14
+ Software is furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included
17
+ in all copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
25
+ IN THE SOFTWARE.
26
+
27
+ =end
@@ -0,0 +1,48 @@
1
+ require 'frequent/version'
2
+
3
+ module Frequent
4
+
5
+ class Algorithm
6
+ attr_reader :n, :b
7
+
8
+ def initialize(n, b)
9
+ @n = n
10
+ @b = b
11
+ end
12
+
13
+ def process(item)
14
+ raise NotImplementedError.new
15
+ end
16
+
17
+ def version
18
+ Frequent::VERSION
19
+ end
20
+
21
+ end
22
+ end
23
+
24
+ =begin
25
+
26
+ The MIT License (MIT)
27
+
28
+ Copyright (c) 2015 Willie Tong, Brooke M. Fujita
29
+
30
+ Permission is hereby granted, free of charge, to any person obtaining a
31
+ copy of this software and associated documentation files (the "Software"),
32
+ to deal in the Software without restriction, including without limitation
33
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
34
+ and/or sell copies of the Software, and to permit persons to whom the
35
+ Software is furnished to do so, subject to the following conditions:
36
+
37
+ The above copyright notice and this permission notice shall be included
38
+ in all copies or substantial portions of the Software.
39
+
40
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
43
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
45
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
46
+ IN THE SOFTWARE.
47
+
48
+ =end
@@ -0,0 +1,29 @@
1
+ module Frequent
2
+ VERSION = '0.0.1'
3
+ end
4
+
5
+ =begin
6
+
7
+ The MIT License (MIT)
8
+
9
+ Copyright (c) 2015 Willie Tong, Brooke M. Fujita
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a
12
+ copy of this software and associated documentation files (the "Software"),
13
+ to deal in the Software without restriction, including without limitation
14
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
15
+ and/or sell copies of the Software, and to permit persons to whom the
16
+ Software is furnished to do so, subject to the following conditions:
17
+
18
+ The above copyright notice and this permission notice shall be included
19
+ in all copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
27
+ IN THE SOFTWARE.
28
+
29
+ =end
metadata ADDED
@@ -0,0 +1,54 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: frequent-algorithm
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Willie Tong
8
+ - Brooke M. Fujita
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2015-03-11 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: |
15
+ frequent-algorithm is a Ruby implementation of the FREQUENT algorithm for identifying frequent items in a data stream in sliding windows. Please refer to [Identifying Frequent Items in Sliding Windows over On-Line Packet Streams](http://erikdemaine.org/papers/SlidingWindow_IMC2003/), by Golab, DeHaan, Demaine, López-Ortiz and Munro (2003).
16
+ email: buruzaemon@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - .yardopts
22
+ - CHANGELOG
23
+ - LICENSE
24
+ - README.md
25
+ - lib/frequent-algorithm.rb
26
+ - lib/frequent/algorithm.rb
27
+ - lib/frequent/version.rb
28
+ homepage: https://github.com/buruzaemon/frequent-algorithm
29
+ licenses:
30
+ - MIT
31
+ metadata: {}
32
+ post_install_message:
33
+ rdoc_options: []
34
+ require_paths:
35
+ - lib
36
+ required_ruby_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '2.0'
41
+ required_rubygems_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ requirements: []
47
+ rubyforge_project:
48
+ rubygems_version: 2.4.1
49
+ signing_key:
50
+ specification_version: 4
51
+ summary: A Ruby implementation of the FREQUENT algorithm for identifying frequent
52
+ items in a data stream in sliding windows.
53
+ test_files: []
54
+ has_rdoc: