ngt 0.2.3 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +26 -0
- data/NOTICE.txt +2 -1
- data/README.md +42 -3
- data/lib/ngt.rb +6 -1
- data/lib/ngt/ffi.rb +17 -4
- data/lib/ngt/index.rb +92 -68
- data/lib/ngt/optimizer.rb +13 -2
- data/lib/ngt/version.rb +1 -1
- data/vendor/libngt.arm64.dylib +0 -0
- data/vendor/libngt.dylib +0 -0
- data/vendor/libngt.so +0 -0
- metadata +9 -64
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60b5246463e87f7d93207b6fe80de719ca27dc9d6414305de8f5a81fb8b9cac6
|
4
|
+
data.tar.gz: 56a9d9b119e6c24fd4b9a32e309e7c400315cd17520768752a224110ae50eaa0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20602673391ee8d7483eb6b86c3d59b5ccecad6bd25d44abdacfae0d5e599918b6b3ca915fbcd5715f449d77ee18c52fe80b3b2797d86f745e72fb4fb2a03605
|
7
|
+
data.tar.gz: 7785fab0add41014f2586766b4a64096cb08b6869bb69042fe82cb0a3dc2731e193e35edc420275736387190e0e690e07f9a81e0c975b2121e910f017704bb25
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,29 @@
|
|
1
|
+
## 0.3.3 (2021-02-15)
|
2
|
+
|
3
|
+
- Added ARM shared library for Mac
|
4
|
+
|
5
|
+
## 0.3.2 (2020-12-27)
|
6
|
+
|
7
|
+
- Updated NGT to 1.12.2
|
8
|
+
|
9
|
+
## 0.3.1 (2020-05-17)
|
10
|
+
|
11
|
+
- Updated NGT to 1.11.5
|
12
|
+
- Improved error message when OpenMP not found on Mac
|
13
|
+
|
14
|
+
## 0.3.0 (2020-03-25)
|
15
|
+
|
16
|
+
- Updated NGT to 1.10.0
|
17
|
+
- Added support for OpenMP on Mac
|
18
|
+
- Create index in memory if no path specified
|
19
|
+
- Added `normalized_angle` and `normalized_cosine`
|
20
|
+
|
21
|
+
## 0.2.4 (2020-03-09)
|
22
|
+
|
23
|
+
- Updated NGT to 1.9.1
|
24
|
+
- Added support for passing an index to optimizers
|
25
|
+
- Added `dimensions`, `distance_type`, `edge_size_for_creation`, `edge_size_for_search`, and `object_type` methods
|
26
|
+
|
1
27
|
## 0.2.3 (2020-03-08)
|
2
28
|
|
3
29
|
- Added `load` method
|
data/NOTICE.txt
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[NGT](https://github.com/yahoojapan/NGT) - high-speed approximate nearest neighbors - for Ruby
|
4
4
|
|
5
|
-
[![Build Status](https://
|
5
|
+
[![Build Status](https://github.com/ankane/ngt/workflows/build/badge.svg?branch=master)](https://github.com/ankane/ngt/actions)
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -12,7 +12,13 @@ Add this line to your application’s Gemfile:
|
|
12
12
|
gem 'ngt'
|
13
13
|
```
|
14
14
|
|
15
|
-
|
15
|
+
On Mac, also install OpenMP:
|
16
|
+
|
17
|
+
```sh
|
18
|
+
brew install libomp
|
19
|
+
```
|
20
|
+
|
21
|
+
NGT is not available for Windows
|
16
22
|
|
17
23
|
## Getting Started
|
18
24
|
|
@@ -84,7 +90,8 @@ Optimize the index
|
|
84
90
|
|
85
91
|
```ruby
|
86
92
|
optimizer = Ngt::Optimizer.new(outgoing: 10, incoming: 120)
|
87
|
-
optimizer.
|
93
|
+
optimizer.adjust_search_coefficients(index)
|
94
|
+
optimizer.execute(index, new_path)
|
88
95
|
```
|
89
96
|
|
90
97
|
## Full Example
|
@@ -108,6 +115,38 @@ result.each do |res|
|
|
108
115
|
end
|
109
116
|
```
|
110
117
|
|
118
|
+
## Index Options
|
119
|
+
|
120
|
+
Defaults shown below
|
121
|
+
|
122
|
+
```ruby
|
123
|
+
Ngt::Index.new(dimensions,
|
124
|
+
edge_size_for_creation: 10,
|
125
|
+
edge_size_for_search: 40,
|
126
|
+
object_type: :float, # :float, :integer
|
127
|
+
distance_type: :l2, # :l1, :l2, :hamming, :angle, :cosine, :normalized_angle, :normalized_cosine, :jaccard
|
128
|
+
path: nil
|
129
|
+
)
|
130
|
+
```
|
131
|
+
|
132
|
+
## Optimizer Options
|
133
|
+
|
134
|
+
Defaults shown below
|
135
|
+
|
136
|
+
```ruby
|
137
|
+
Ngt::Optimizer.new(
|
138
|
+
outgoing: 10,
|
139
|
+
incoming: 120,
|
140
|
+
queries: 100,
|
141
|
+
low_accuracy_from: 0.3,
|
142
|
+
low_accuracy_to: 0.5,
|
143
|
+
high_accuracy_from: 0.8,
|
144
|
+
high_accuracy_to: 0.9,
|
145
|
+
gt_epsilon: 0.1,
|
146
|
+
merge: 0.2
|
147
|
+
)
|
148
|
+
```
|
149
|
+
|
111
150
|
## Data
|
112
151
|
|
113
152
|
Data can be an array of arrays
|
data/lib/ngt.rb
CHANGED
@@ -16,7 +16,12 @@ module Ngt
|
|
16
16
|
class << self
|
17
17
|
attr_accessor :ffi_lib
|
18
18
|
end
|
19
|
-
lib_name =
|
19
|
+
lib_name =
|
20
|
+
if RbConfig::CONFIG["host_os"] =~ /darwin/i && RbConfig::CONFIG["host_cpu"] =~ /arm/i
|
21
|
+
FFI.map_library_name("ngt.arm64")
|
22
|
+
else
|
23
|
+
FFI.map_library_name("ngt")
|
24
|
+
end
|
20
25
|
vendor_lib = File.expand_path("../vendor/#{lib_name}", __dir__)
|
21
26
|
self.ffi_lib = [vendor_lib]
|
22
27
|
|
data/lib/ngt/ffi.rb
CHANGED
@@ -5,7 +5,11 @@ module Ngt
|
|
5
5
|
begin
|
6
6
|
ffi_lib Ngt.ffi_lib
|
7
7
|
rescue LoadError => e
|
8
|
-
|
8
|
+
if e.message.include?("Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib") && e.message.include?("Reason: image not found")
|
9
|
+
raise LoadError, "OpenMP not found. Run `brew install libomp`"
|
10
|
+
else
|
11
|
+
raise e
|
12
|
+
end
|
9
13
|
end
|
10
14
|
|
11
15
|
# https://github.com/yahoojapan/NGT/blob/master/lib/NGT/Capi.h
|
@@ -19,8 +23,11 @@ module Ngt
|
|
19
23
|
:distance, :float
|
20
24
|
end
|
21
25
|
|
26
|
+
enum :distance_type, [:l1, :l2, :hamming, :angle, :cosine, :normalized_angle, :normalized_cosine, :jaccard]
|
27
|
+
|
22
28
|
attach_function :ngt_open_index, %i[string pointer], :pointer
|
23
29
|
attach_function :ngt_create_graph_and_tree, %i[string pointer pointer], :pointer
|
30
|
+
attach_function :ngt_create_graph_and_tree_in_memory, %i[pointer pointer], :pointer
|
24
31
|
attach_function :ngt_create_property, %i[pointer], :pointer
|
25
32
|
attach_function :ngt_save_index, %i[pointer string pointer], :bool
|
26
33
|
attach_function :ngt_get_property, %i[pointer pointer pointer], :bool
|
@@ -38,20 +45,26 @@ module Ngt
|
|
38
45
|
attach_function :ngt_set_property_distance_type_hamming, %i[pointer pointer], :bool
|
39
46
|
attach_function :ngt_set_property_distance_type_jaccard, %i[pointer pointer], :bool
|
40
47
|
attach_function :ngt_set_property_distance_type_cosine, %i[pointer pointer], :bool
|
41
|
-
attach_function :
|
42
|
-
attach_function :
|
43
|
-
attach_function :ngt_remove_index, %i[pointer int pointer], :bool
|
48
|
+
attach_function :ngt_set_property_distance_type_normalized_angle, %i[pointer pointer], :bool
|
49
|
+
attach_function :ngt_set_property_distance_type_normalized_cosine, %i[pointer pointer], :bool
|
44
50
|
attach_function :ngt_insert_index, %i[pointer pointer uint32 pointer], :int
|
45
51
|
attach_function :ngt_insert_index_as_float, %i[pointer pointer uint32 pointer], :int
|
46
52
|
attach_function :ngt_create_empty_results, %i[pointer], :pointer
|
47
53
|
attach_function :ngt_search_index, %i[pointer pointer int32 size_t float float pointer pointer], :bool
|
48
54
|
attach_function :ngt_get_result_size, %i[pointer pointer], :uint32
|
49
55
|
attach_function :ngt_get_result, %i[pointer uint32 pointer], ObjectDistance.by_value
|
56
|
+
attach_function :ngt_batch_insert_index, %i[pointer pointer uint32 pointer pointer], :bool
|
57
|
+
attach_function :ngt_create_index, %i[pointer uint32 pointer], :bool
|
58
|
+
attach_function :ngt_remove_index, %i[pointer int pointer], :bool
|
50
59
|
attach_function :ngt_get_object_space, %i[pointer pointer], :pointer
|
51
60
|
attach_function :ngt_get_object_as_float, %i[pointer int pointer], :pointer
|
52
61
|
attach_function :ngt_get_object_as_integer, %i[pointer int pointer], :pointer
|
62
|
+
attach_function :ngt_destroy_results, %i[pointer], :void
|
53
63
|
attach_function :ngt_destroy_property, %i[pointer], :void
|
54
64
|
attach_function :ngt_close_index, %i[pointer], :void
|
65
|
+
attach_function :ngt_get_property_edge_size_for_creation, %i[pointer pointer], :int16
|
66
|
+
attach_function :ngt_get_property_edge_size_for_search, %i[pointer pointer], :int16
|
67
|
+
attach_function :ngt_get_property_distance_type, %i[pointer pointer], :distance_type
|
55
68
|
attach_function :ngt_create_error_object, %i[], :pointer
|
56
69
|
attach_function :ngt_get_error_string, %i[pointer], :string
|
57
70
|
attach_function :ngt_destroy_error_object, %i[pointer], :void
|
data/lib/ngt/index.rb
CHANGED
@@ -2,26 +2,44 @@ module Ngt
|
|
2
2
|
class Index
|
3
3
|
include Utils
|
4
4
|
|
5
|
-
|
5
|
+
attr_reader :path
|
6
|
+
|
7
|
+
def initialize(index, path)
|
8
|
+
@index = index
|
6
9
|
@path = path
|
10
|
+
|
7
11
|
@error = FFI.ngt_create_error_object
|
8
|
-
@
|
12
|
+
@property = ffi(:ngt_create_property)
|
13
|
+
ffi(:ngt_get_property, @index, @property)
|
9
14
|
|
10
|
-
|
11
|
-
|
15
|
+
ObjectSpace.define_finalizer(self, self.class.finalize(@error, @index, @property))
|
16
|
+
end
|
12
17
|
|
13
|
-
|
18
|
+
def dimensions
|
19
|
+
@dimensions ||= ffi(:ngt_get_property_dimension, @property)
|
20
|
+
end
|
14
21
|
|
15
|
-
|
16
|
-
@
|
22
|
+
def distance_type
|
23
|
+
@distance_type ||= ffi(:ngt_get_property_distance_type, @property)
|
24
|
+
end
|
17
25
|
|
18
|
-
|
26
|
+
def edge_size_for_creation
|
27
|
+
@edge_size_for_creation ||= ffi(:ngt_get_property_edge_size_for_creation, @property)
|
28
|
+
end
|
29
|
+
|
30
|
+
def edge_size_for_search
|
31
|
+
@edge_size_for_search ||= ffi(:ngt_get_property_edge_size_for_search, @property)
|
32
|
+
end
|
19
33
|
|
20
|
-
|
34
|
+
def object_type
|
35
|
+
@object_type ||= begin
|
36
|
+
object_type = ffi(:ngt_get_property_object_type, @property)
|
37
|
+
FFI.ngt_is_property_object_type_float(object_type) ? :float : :integer
|
38
|
+
end
|
21
39
|
end
|
22
40
|
|
23
41
|
def insert(object)
|
24
|
-
ffi(:ngt_insert_index, @index, c_object(object.to_a),
|
42
|
+
ffi(:ngt_insert_index, @index, c_object(object.to_a), dimensions)
|
25
43
|
end
|
26
44
|
|
27
45
|
def batch_insert(objects, num_threads: 8)
|
@@ -51,12 +69,12 @@ module Ngt
|
|
51
69
|
end
|
52
70
|
|
53
71
|
def object(id)
|
54
|
-
if float
|
72
|
+
if object_type == :float
|
55
73
|
res = ffi(:ngt_get_object_as_float, @object_space, id)
|
56
|
-
res.read_array_of_float(
|
74
|
+
res.read_array_of_float(dimensions)
|
57
75
|
else
|
58
76
|
res = ffi(:ngt_get_object_as_integer, @object_space, id)
|
59
|
-
res.read_array_of_uint8(
|
77
|
+
res.read_array_of_uint8(dimensions)
|
60
78
|
end
|
61
79
|
end
|
62
80
|
|
@@ -67,7 +85,7 @@ module Ngt
|
|
67
85
|
def search(query, size: 20, epsilon: 0.1, radius: nil)
|
68
86
|
radius ||= -1.0
|
69
87
|
results = ffi(:ngt_create_empty_results)
|
70
|
-
ffi(:ngt_search_index, @index, c_object(query.to_a),
|
88
|
+
ffi(:ngt_search_index, @index, c_object(query.to_a), dimensions, size, epsilon, radius, results)
|
71
89
|
result_size = ffi(:ngt_get_result_size, results)
|
72
90
|
ret = []
|
73
91
|
result_size.times do |i|
|
@@ -78,82 +96,91 @@ module Ngt
|
|
78
96
|
}
|
79
97
|
end
|
80
98
|
ret
|
99
|
+
ensure
|
100
|
+
FFI.ngt_destroy_results(results) if results
|
81
101
|
end
|
82
102
|
|
83
103
|
def save(path2 = nil, path: nil)
|
84
104
|
warn "[ngt] Passing path as an option is deprecated - use an argument instead" if path
|
85
|
-
path
|
86
|
-
ffi(:ngt_save_index, @index, path)
|
105
|
+
@path = path || path2 || @path || Dir.mktmpdir
|
106
|
+
ffi(:ngt_save_index, @index, @path)
|
87
107
|
end
|
88
108
|
|
89
109
|
def close
|
90
110
|
FFI.ngt_close_index(@index)
|
91
111
|
end
|
92
112
|
|
93
|
-
def self.new(
|
94
|
-
edge_size_for_search: 40, object_type:
|
113
|
+
def self.new(dimensions, path: nil, edge_size_for_creation: 10,
|
114
|
+
edge_size_for_search: 40, object_type: :float, distance_type: :l2)
|
95
115
|
|
96
|
-
|
97
|
-
return super(path) if path && dimension.nil?
|
116
|
+
error = FFI.ngt_create_error_object
|
98
117
|
|
99
|
-
# TODO remove in 0.
|
100
|
-
|
101
|
-
unless create
|
118
|
+
# TODO remove in 0.4.0
|
119
|
+
if !dimensions.is_a?(Integer) && !path
|
102
120
|
warn "[ngt] Passing a path to new is deprecated - use load instead"
|
103
|
-
|
121
|
+
path = dimensions
|
122
|
+
dimensions = nil
|
104
123
|
end
|
105
124
|
|
106
|
-
path
|
107
|
-
|
108
|
-
property = ffi(:ngt_create_property, error)
|
109
|
-
ffi(:ngt_set_property_dimension, property, dimension, error)
|
110
|
-
ffi(:ngt_set_property_edge_size_for_creation, property, edge_size_for_creation, error)
|
111
|
-
ffi(:ngt_set_property_edge_size_for_search, property, edge_size_for_search, error)
|
112
|
-
|
113
|
-
case object_type.to_s
|
114
|
-
when "Float", "float"
|
115
|
-
ffi(:ngt_set_property_object_type_float, property, error)
|
116
|
-
when "Integer", "integer"
|
117
|
-
ffi(:ngt_set_property_object_type_integer, property, error)
|
125
|
+
if path && dimensions.nil?
|
126
|
+
index = ffi(:ngt_open_index, path, error)
|
118
127
|
else
|
119
|
-
|
128
|
+
property = ffi(:ngt_create_property, error)
|
129
|
+
ffi(:ngt_set_property_dimension, property, dimensions, error)
|
130
|
+
ffi(:ngt_set_property_edge_size_for_creation, property, edge_size_for_creation, error)
|
131
|
+
ffi(:ngt_set_property_edge_size_for_search, property, edge_size_for_search, error)
|
132
|
+
|
133
|
+
case object_type.to_s.downcase
|
134
|
+
when "float"
|
135
|
+
ffi(:ngt_set_property_object_type_float, property, error)
|
136
|
+
when "integer"
|
137
|
+
ffi(:ngt_set_property_object_type_integer, property, error)
|
138
|
+
else
|
139
|
+
raise ArgumentError, "Unknown object type: #{object_type}"
|
140
|
+
end
|
141
|
+
|
142
|
+
case distance_type.to_s.downcase
|
143
|
+
when "l1"
|
144
|
+
ffi(:ngt_set_property_distance_type_l1, property, error)
|
145
|
+
when "l2"
|
146
|
+
ffi(:ngt_set_property_distance_type_l2, property, error)
|
147
|
+
when "angle"
|
148
|
+
ffi(:ngt_set_property_distance_type_angle, property, error)
|
149
|
+
when "hamming"
|
150
|
+
ffi(:ngt_set_property_distance_type_hamming, property, error)
|
151
|
+
when "jaccard"
|
152
|
+
ffi(:ngt_set_property_distance_type_jaccard, property, error)
|
153
|
+
when "cosine"
|
154
|
+
ffi(:ngt_set_property_distance_type_cosine, property, error)
|
155
|
+
when "normalized_angle"
|
156
|
+
ffi(:ngt_set_property_distance_type_normalized_angle, property, error)
|
157
|
+
when "normalized_cosine"
|
158
|
+
ffi(:ngt_set_property_distance_type_normalized_cosine, property, error)
|
159
|
+
else
|
160
|
+
raise ArgumentError, "Unknown distance type: #{distance_type}"
|
161
|
+
end
|
162
|
+
|
163
|
+
index =
|
164
|
+
if path
|
165
|
+
ffi(:ngt_create_graph_and_tree, path, property, error)
|
166
|
+
else
|
167
|
+
ffi(:ngt_create_graph_and_tree_in_memory, property, error)
|
168
|
+
end
|
120
169
|
end
|
121
170
|
|
122
|
-
|
123
|
-
when "L1"
|
124
|
-
ffi(:ngt_set_property_distance_type_l1, property, error)
|
125
|
-
when "L2"
|
126
|
-
ffi(:ngt_set_property_distance_type_l2, property, error)
|
127
|
-
when "Angle"
|
128
|
-
ffi(:ngt_set_property_distance_type_angle, property, error)
|
129
|
-
when "Hamming"
|
130
|
-
ffi(:ngt_set_property_distance_type_hamming, property, error)
|
131
|
-
when "Jaccard"
|
132
|
-
ffi(:ngt_set_property_distance_type_jaccard, property, error)
|
133
|
-
when "Cosine"
|
134
|
-
ffi(:ngt_set_property_distance_type_cosine, property, error)
|
135
|
-
else
|
136
|
-
raise ArgumentError, "Unknown distance type: #{distance_type}"
|
137
|
-
end
|
138
|
-
|
139
|
-
index = ffi(:ngt_create_graph_and_tree, path, property, error)
|
140
|
-
FFI.ngt_close_index(index)
|
141
|
-
index = nil
|
142
|
-
|
143
|
-
super(path)
|
171
|
+
super(index, path)
|
144
172
|
ensure
|
145
173
|
FFI.ngt_destroy_error_object(error) if error
|
146
174
|
FFI.ngt_destroy_property(property) if property
|
147
|
-
FFI.ngt_close_index(index) if index
|
148
175
|
end
|
149
176
|
|
150
177
|
def self.load(path)
|
151
178
|
new(nil, path: path)
|
152
179
|
end
|
153
180
|
|
154
|
-
def self.create(path,
|
181
|
+
def self.create(path, dimensions, **options)
|
155
182
|
warn "[ngt] create is deprecated - use new instead"
|
156
|
-
new(
|
183
|
+
new(dimensions, path: path, **options)
|
157
184
|
end
|
158
185
|
|
159
186
|
# private
|
@@ -161,11 +188,12 @@ module Ngt
|
|
161
188
|
Utils.ffi(*args)
|
162
189
|
end
|
163
190
|
|
164
|
-
def self.finalize(error)
|
191
|
+
def self.finalize(error, index, property)
|
165
192
|
# must use proc instead of stabby lambda
|
166
193
|
proc do
|
167
|
-
# TODO clean-up more objects
|
168
194
|
FFI.ngt_destroy_error_object(error)
|
195
|
+
FFI.ngt_close_index(index)
|
196
|
+
FFI.ngt_destroy_property(property)
|
169
197
|
end
|
170
198
|
end
|
171
199
|
|
@@ -175,10 +203,6 @@ module Ngt
|
|
175
203
|
defined?(Numo::NArray) && data.is_a?(Numo::NArray)
|
176
204
|
end
|
177
205
|
|
178
|
-
def float?
|
179
|
-
@float
|
180
|
-
end
|
181
|
-
|
182
206
|
def c_object(object)
|
183
207
|
c_object = ::FFI::MemoryPointer.new(:double, object.size)
|
184
208
|
c_object.write_array_of_double(object)
|
data/lib/ngt/optimizer.rb
CHANGED
@@ -15,11 +15,11 @@ module Ngt
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def execute(in_index_path, out_index_path)
|
18
|
-
ffi(:ngt_optimizer_execute, @optimizer, in_index_path, out_index_path)
|
18
|
+
ffi(:ngt_optimizer_execute, @optimizer, path(in_index_path), out_index_path)
|
19
19
|
end
|
20
20
|
|
21
21
|
def adjust_search_coefficients(index_path)
|
22
|
-
ffi(:ngt_optimizer_adjust_search_coefficients, @optimizer, index_path)
|
22
|
+
ffi(:ngt_optimizer_adjust_search_coefficients, @optimizer, path(index_path))
|
23
23
|
end
|
24
24
|
|
25
25
|
def self.finalize(optimizer, error)
|
@@ -29,5 +29,16 @@ module Ngt
|
|
29
29
|
FFI.ngt_destroy_error_object(error)
|
30
30
|
end
|
31
31
|
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def path(obj)
|
36
|
+
if obj.is_a?(Ngt::Index)
|
37
|
+
raise ArgumentError, "Index not saved" unless obj.path
|
38
|
+
obj.path
|
39
|
+
else
|
40
|
+
obj
|
41
|
+
end
|
42
|
+
end
|
32
43
|
end
|
33
44
|
end
|
data/lib/ngt/version.rb
CHANGED
Binary file
|
data/vendor/libngt.dylib
CHANGED
Binary file
|
data/vendor/libngt.so
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ngt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -24,64 +24,8 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
|
28
|
-
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rake
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: minitest
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '5'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '5'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: numo-narray
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
description:
|
84
|
-
email: andrew@chartkick.com
|
27
|
+
description:
|
28
|
+
email: andrew@ankane.org
|
85
29
|
executables: []
|
86
30
|
extensions: []
|
87
31
|
extra_rdoc_files: []
|
@@ -97,13 +41,14 @@ files:
|
|
97
41
|
- lib/ngt/utils.rb
|
98
42
|
- lib/ngt/version.rb
|
99
43
|
- vendor/LICENSE
|
44
|
+
- vendor/libngt.arm64.dylib
|
100
45
|
- vendor/libngt.dylib
|
101
46
|
- vendor/libngt.so
|
102
47
|
homepage: https://github.com/ankane/ngt
|
103
48
|
licenses:
|
104
49
|
- Apache-2.0
|
105
50
|
metadata: {}
|
106
|
-
post_install_message:
|
51
|
+
post_install_message:
|
107
52
|
rdoc_options: []
|
108
53
|
require_paths:
|
109
54
|
- lib
|
@@ -118,8 +63,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
63
|
- !ruby/object:Gem::Version
|
119
64
|
version: '0'
|
120
65
|
requirements: []
|
121
|
-
rubygems_version: 3.
|
122
|
-
signing_key:
|
66
|
+
rubygems_version: 3.2.3
|
67
|
+
signing_key:
|
123
68
|
specification_version: 4
|
124
69
|
summary: High-speed approximate nearest neighbors for Ruby
|
125
70
|
test_files: []
|