sparsehash 0.1.0-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- data/README +74 -0
- data/etc/anymap.rb +34 -0
- data/etc/anyset.rb +34 -0
- data/lib/i386-mswin32/sparsehash.so +0 -0
- metadata +59 -0
data/README
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
= sparsehash
|
2
|
+
|
3
|
+
Copyright (c) 2009 SUGAWARA Genki <sgwr_dts@yahoo.co.jp>
|
4
|
+
|
5
|
+
== Description
|
6
|
+
|
7
|
+
Ruby bindings for Google Sparse Hash.
|
8
|
+
|
9
|
+
see {Google Sparse Hash}[http://goog-sparsehash.sourceforge.net/].
|
10
|
+
|
11
|
+
== Install
|
12
|
+
|
13
|
+
gem install sparsehash
|
14
|
+
|
15
|
+
== Example
|
16
|
+
|
17
|
+
require 'sparsehash'
|
18
|
+
|
19
|
+
map = Sparsehash::SparseHashMap.new
|
20
|
+
map['foo'] = 'bar'
|
21
|
+
map['zoo'] = 'baz'
|
22
|
+
|
23
|
+
map.each do |k, v|
|
24
|
+
puts "#{k}=#{v}"
|
25
|
+
end
|
26
|
+
|
27
|
+
set = Sparsehash::SparseHashSet.new
|
28
|
+
set << 'foo'
|
29
|
+
set << 'bar'
|
30
|
+
|
31
|
+
set.each do |v|
|
32
|
+
puts v
|
33
|
+
end
|
34
|
+
|
35
|
+
== Performance
|
36
|
+
|
37
|
+
link:memory.png
|
38
|
+
link:time.png
|
39
|
+
|
40
|
+
== Project Page
|
41
|
+
|
42
|
+
http://rubyforge.org/projects/sparsehash
|
43
|
+
|
44
|
+
== Source Code
|
45
|
+
|
46
|
+
http://coderepos.org/share/browser/lang/ruby/ruby-sparsehash
|
47
|
+
|
48
|
+
== License
|
49
|
+
|
50
|
+
Copyright (c) 2009 SUGAWARA Genki <sgwr_dts@yahoo.co.jp>
|
51
|
+
All rights reserved.
|
52
|
+
|
53
|
+
Redistribution and use in source and binary forms, with or without modification,
|
54
|
+
are permitted provided that the following conditions are met:
|
55
|
+
|
56
|
+
* Redistributions of source code must retain the above copyright notice,
|
57
|
+
this list of conditions and the following disclaimer.
|
58
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
59
|
+
this list of conditions and the following disclaimer in the documentation
|
60
|
+
and/or other materials provided with the distribution.
|
61
|
+
* The names of its contributors may not be used to endorse or promote products
|
62
|
+
derived from this software without specific prior written permission.
|
63
|
+
|
64
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
65
|
+
ANY EXPRESS OR IMPLIED WARRANTIES,
|
66
|
+
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
67
|
+
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
68
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
69
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
70
|
+
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
71
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
72
|
+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
73
|
+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
74
|
+
DAMAGE.
|
data/etc/anymap.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# * Sparsehash::SparseHashMap
|
2
|
+
# * Sparsehash::DenseHashMap
|
3
|
+
# * STL::Map
|
4
|
+
# * GNU::HashMap (gcc only)
|
5
|
+
#
|
6
|
+
# (include Enumerable)
|
7
|
+
class AnyMap
|
8
|
+
def [](key)
|
9
|
+
end
|
10
|
+
|
11
|
+
def []=(key, value)
|
12
|
+
end
|
13
|
+
|
14
|
+
def each
|
15
|
+
end
|
16
|
+
|
17
|
+
def erase(key)
|
18
|
+
end
|
19
|
+
|
20
|
+
def delete(key)
|
21
|
+
end
|
22
|
+
|
23
|
+
def size
|
24
|
+
end
|
25
|
+
|
26
|
+
def length
|
27
|
+
end
|
28
|
+
|
29
|
+
def empty?
|
30
|
+
end
|
31
|
+
|
32
|
+
def clear
|
33
|
+
end
|
34
|
+
end
|
data/etc/anyset.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# * Sparsehash::SparseHashSet
|
2
|
+
# * Sparsehash::DenseHashSet
|
3
|
+
# * STL::Set
|
4
|
+
# * GNU::HashMap (gcc only)
|
5
|
+
#
|
6
|
+
# (include Enumerable)
|
7
|
+
class AnySet
|
8
|
+
def insert(value)
|
9
|
+
end
|
10
|
+
|
11
|
+
def <<(value)
|
12
|
+
end
|
13
|
+
|
14
|
+
def each
|
15
|
+
end
|
16
|
+
|
17
|
+
def erase(value)
|
18
|
+
end
|
19
|
+
|
20
|
+
def delete(value)
|
21
|
+
end
|
22
|
+
|
23
|
+
def size
|
24
|
+
end
|
25
|
+
|
26
|
+
def length
|
27
|
+
end
|
28
|
+
|
29
|
+
def empty?
|
30
|
+
end
|
31
|
+
|
32
|
+
def clear
|
33
|
+
end
|
34
|
+
end
|
Binary file
|
metadata
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sparsehash
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: mswin32
|
6
|
+
authors:
|
7
|
+
- winebarrel
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-05-20 00:00:00 +09:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description:
|
17
|
+
email: sgwr_dts@yahoo.co.jp
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- README
|
24
|
+
- etc/anymap.rb
|
25
|
+
- etc/anyset.rb
|
26
|
+
files:
|
27
|
+
- lib/i386-mswin32/sparsehash.so
|
28
|
+
- README
|
29
|
+
- etc/anymap.rb
|
30
|
+
- etc/anyset.rb
|
31
|
+
has_rdoc: true
|
32
|
+
homepage: http://sparsehash.rubyforge.org
|
33
|
+
post_install_message:
|
34
|
+
rdoc_options:
|
35
|
+
- --title
|
36
|
+
- sparsehash - Ruby bindings for Google Sparse Hash.
|
37
|
+
require_paths:
|
38
|
+
- lib/i386-mswin32
|
39
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: "0"
|
44
|
+
version:
|
45
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: "0"
|
50
|
+
version:
|
51
|
+
requirements: []
|
52
|
+
|
53
|
+
rubyforge_project: sparsehash
|
54
|
+
rubygems_version: 1.3.1
|
55
|
+
signing_key:
|
56
|
+
specification_version: 2
|
57
|
+
summary: Ruby bindings for Google Sparse Hash.
|
58
|
+
test_files: []
|
59
|
+
|