data_structures_101 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/.rubocop.yml +3 -1
- data/.travis.yml +4 -1
- data/Rakefile +1 -0
- data/data_structures_101.gemspec +9 -5
- data/docs/graphs/hash/default_benchmark_delete.png +0 -0
- data/docs/graphs/hash/default_benchmark_find.png +0 -0
- data/docs/graphs/hash/default_benchmark_insert.png +0 -0
- data/docs/graphs/hash/division_method_benchmark_delete.png +0 -0
- data/docs/graphs/hash/division_method_benchmark_find.png +0 -0
- data/docs/graphs/hash/division_method_benchmark_insert.png +0 -0
- data/docs/graphs/hash/quadratic_probing_benchmark_delete.png +0 -0
- data/docs/graphs/hash/quadratic_probing_benchmark_find.png +0 -0
- data/docs/graphs/hash/quadratic_probing_benchmark_insert.png +0 -0
- data/lib/data_structures_101/probe_hash_table.rb +2 -2
- data/lib/data_structures_101/version.rb +1 -1
- metadata +25 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9da1e1c439afbfee405a03d8a20ee10801f2ad21
|
4
|
+
data.tar.gz: f23f1dd42d7bf0101857de009811880c143f76a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 866abc6a74bce5ba8f9c53f207c79f51b8d25588e753b5592ca5d1c0c749e2836ae20a70cc2f04307fa8aeaa0cfe03778de2468db949f102f39e6c20f578753e
|
7
|
+
data.tar.gz: 8e204a45a38b935ee32b43ca4da0586788ab4166666594522e252cb847030c9e0164fb4252a6f846248837181dfa0974eeeb2b5992dd6dd2ba8a00838873a8ea
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -2,6 +2,9 @@ sudo: false
|
|
2
2
|
language: ruby
|
3
3
|
rvm:
|
4
4
|
- 2.4.0
|
5
|
+
env:
|
6
|
+
global:
|
7
|
+
- CI: true
|
5
8
|
script:
|
6
9
|
- bundle exec rspec
|
7
10
|
- bundle exec rubocop lib
|
@@ -11,7 +14,7 @@ deploy:
|
|
11
14
|
- provider: pages
|
12
15
|
skip_cleanup: true
|
13
16
|
github_token: $GITHUB_TOKEN
|
14
|
-
local_dir:
|
17
|
+
local_dir: .
|
15
18
|
target_branch: gh-pages
|
16
19
|
on:
|
17
20
|
branch: master
|
data/Rakefile
CHANGED
data/data_structures_101.gemspec
CHANGED
@@ -10,11 +10,11 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["renehr9102@gmail.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{DataStructures101 is a simple gem that groups several implementations of common data structures usually taught in Computer Science courses.}
|
13
|
-
spec.homepage = "https://github.com/renehernandez/
|
13
|
+
spec.homepage = "https://github.com/renehernandez/data_structures_101"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
17
|
-
f.match(%r{^(test|spec|features)/})
|
17
|
+
f.match(%r{^(test|spec|features|doc|tasks)/})
|
18
18
|
end
|
19
19
|
spec.bindir = "exe"
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
@@ -25,7 +25,11 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_development_dependency "rspec", "~> 3.5"
|
26
26
|
spec.add_development_dependency "reek", "~> 4.7"
|
27
27
|
spec.add_development_dependency "rubocop", "~> 0.49"
|
28
|
-
spec.add_development_dependency "yard"
|
29
|
-
spec.add_development_dependency "redcarpet"
|
30
|
-
spec.add_development_dependency "github-markup"
|
28
|
+
spec.add_development_dependency "yard", "~> 0.9"
|
29
|
+
spec.add_development_dependency "redcarpet", "~> 3.4"
|
30
|
+
spec.add_development_dependency "github-markup", "~> 1.6"
|
31
|
+
unless ENV['CI']
|
32
|
+
spec.add_development_dependency "benchmark-ips", "~> 2.7"
|
33
|
+
spec.add_development_dependency "gruff", "~> 0.7"
|
34
|
+
end
|
31
35
|
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -19,7 +19,7 @@ module DataStructures101
|
|
19
19
|
|
20
20
|
return unless @probe_lambda.nil?
|
21
21
|
|
22
|
-
@probe_lambda = ->(h, i) { return (h + i) %
|
22
|
+
@probe_lambda = ->(h, i, cap) { return (h + i) % cap }
|
23
23
|
end
|
24
24
|
|
25
25
|
private
|
@@ -73,7 +73,7 @@ module DataStructures101
|
|
73
73
|
|
74
74
|
j = 0
|
75
75
|
loop do
|
76
|
-
i = @probe_lambda.call(h, j)
|
76
|
+
i = @probe_lambda.call(h, j, @capacity)
|
77
77
|
if slot_available?(i)
|
78
78
|
idx = i if idx == -1
|
79
79
|
break if @table[i].nil?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: data_structures_101
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- renehernandez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,44 +84,44 @@ dependencies:
|
|
84
84
|
name: yard
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
89
|
+
version: '0.9'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
96
|
+
version: '0.9'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: redcarpet
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '3.4'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '3.4'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: github-markup
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '1.6'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '1.6'
|
125
125
|
description:
|
126
126
|
email:
|
127
127
|
- renehr9102@gmail.com
|
@@ -144,6 +144,15 @@ files:
|
|
144
144
|
- bin/setup
|
145
145
|
- config.reek
|
146
146
|
- data_structures_101.gemspec
|
147
|
+
- docs/graphs/hash/default_benchmark_delete.png
|
148
|
+
- docs/graphs/hash/default_benchmark_find.png
|
149
|
+
- docs/graphs/hash/default_benchmark_insert.png
|
150
|
+
- docs/graphs/hash/division_method_benchmark_delete.png
|
151
|
+
- docs/graphs/hash/division_method_benchmark_find.png
|
152
|
+
- docs/graphs/hash/division_method_benchmark_insert.png
|
153
|
+
- docs/graphs/hash/quadratic_probing_benchmark_delete.png
|
154
|
+
- docs/graphs/hash/quadratic_probing_benchmark_find.png
|
155
|
+
- docs/graphs/hash/quadratic_probing_benchmark_insert.png
|
147
156
|
- lib/data_structures_101.rb
|
148
157
|
- lib/data_structures_101/chained_hash_table.rb
|
149
158
|
- lib/data_structures_101/hash/base_hash_table.rb
|
@@ -151,7 +160,7 @@ files:
|
|
151
160
|
- lib/data_structures_101/linked_list.rb
|
152
161
|
- lib/data_structures_101/probe_hash_table.rb
|
153
162
|
- lib/data_structures_101/version.rb
|
154
|
-
homepage: https://github.com/renehernandez/
|
163
|
+
homepage: https://github.com/renehernandez/data_structures_101
|
155
164
|
licenses:
|
156
165
|
- MIT
|
157
166
|
metadata: {}
|
@@ -171,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
171
180
|
version: '0'
|
172
181
|
requirements: []
|
173
182
|
rubyforge_project:
|
174
|
-
rubygems_version: 2.6.
|
183
|
+
rubygems_version: 2.6.13
|
175
184
|
signing_key:
|
176
185
|
specification_version: 4
|
177
186
|
summary: DataStructures101 is a simple gem that groups several implementations of
|