hnswlib 0.9.1 → 0.9.3
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/ext/hnswlib/extconf.rb +0 -2
- data/ext/hnswlib/hnswlibext.cpp +1 -1
- data/ext/hnswlib/hnswlibext.hpp +1 -2
- data/ext/hnswlib/src/bruteforce.h +1 -1
- data/lib/hnswlib/version.rb +1 -1
- data/lib/hnswlib.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3ddc5b6403c5ccc256534c136ff544c8e7e68fc4914cc894c1a28e56e57e139a
|
|
4
|
+
data.tar.gz: e503e0f85d3eefc5cf49f6ab5a21598f5b4205dc81bfd115e9d6ed4ab8bb4451
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 197eb7d2d6b8319205b093413f13b28a5463106695f2f262d37a7de726fe09464e5389c230ddd4f9fa389d6ede077b0c9b643dd748c12467e6181cc3dd71ef06
|
|
7
|
+
data.tar.gz: 85ce6f7cce53275908c46cbaa5d341608096607433888c3ba78af03f3737c40eb2ba1c7f10753bdb128cdeabdd49bd82ef19c0d22c0cfcb85ffc0fa47aa3de6b
|
data/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
## [[0.9.
|
|
1
|
+
## [[0.9.3](https://github.com/yoshoku/hnswlib.rb/compare/v0.9.2...v0.9.3)] - 2026-02-17
|
|
2
|
+
|
|
3
|
+
- Fix to access map entry before erasing to prevent use-after-erase segmentation fault.
|
|
4
|
+
|
|
5
|
+
## [[0.9.2](https://github.com/yoshoku/hnswlib.rb/compare/v0.9.1...v0.9.2)] - 2026-02-16
|
|
6
|
+
|
|
7
|
+
- Remove libstdc++ loading check from native extensions build step.
|
|
8
|
+
|
|
9
|
+
## [[0.9.1](https://github.com/yoshoku/hnswlib.rb/compare/v0.9.0...v0.9.1)] - 2025-11-23
|
|
2
10
|
|
|
3
11
|
- Fix to use require for compatibility with distributions installing extensions separately.
|
|
4
12
|
|
data/ext/hnswlib/extconf.rb
CHANGED
data/ext/hnswlib/hnswlibext.cpp
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* hnswlib.rb is a Ruby binding for the Hnswlib.
|
|
3
3
|
*
|
|
4
|
-
* Copyright (c) 2021-
|
|
4
|
+
* Copyright (c) 2021-2026 Atsushi Tatsuma
|
|
5
5
|
*
|
|
6
6
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
* you may not use this file except in compliance with the License.
|
data/ext/hnswlib/hnswlibext.hpp
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* hnswlib.rb is a Ruby binding for the Hnswlib.
|
|
3
3
|
*
|
|
4
|
-
* Copyright (c) 2021-
|
|
4
|
+
* Copyright (c) 2021-2026 Atsushi Tatsuma
|
|
5
5
|
*
|
|
6
6
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
* you may not use this file except in compliance with the License.
|
|
@@ -695,7 +695,6 @@ private:
|
|
|
695
695
|
return Qnil;
|
|
696
696
|
}
|
|
697
697
|
|
|
698
|
-
hnswlib::SpaceInterface<float>* space;
|
|
699
698
|
if (strcmp(StringValueCStr(kw_values[0]), "l2") == 0) {
|
|
700
699
|
rb_iv_set(self, "@space", rb_funcall(rb_const_get(rb_mHnswlib, rb_intern("L2Space")), rb_intern("new"), 1, kw_values[1]));
|
|
701
700
|
} else {
|
|
@@ -92,9 +92,9 @@ class BruteforceSearch : public AlgorithmInterface<dist_t> {
|
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
size_t cur_c = found->second;
|
|
95
96
|
dict_external_to_internal.erase(found);
|
|
96
97
|
|
|
97
|
-
size_t cur_c = found->second;
|
|
98
98
|
labeltype label = *((labeltype*)(data_ + size_per_element_ * (cur_element_count-1) + data_size_));
|
|
99
99
|
dict_external_to_internal[label] = cur_c;
|
|
100
100
|
memcpy(data_ + size_per_element_ * cur_c,
|
data/lib/hnswlib/version.rb
CHANGED
data/lib/hnswlib.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require_relative 'hnswlib/version'
|
|
4
|
-
# On
|
|
4
|
+
# On RHEL-based Linux distributions, native extensions are installed in a separate
|
|
5
5
|
# directory from Ruby code, so use require to load them.
|
|
6
6
|
require 'hnswlib/hnswlibext'
|
|
7
7
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hnswlib
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- yoshoku
|
|
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
57
57
|
- !ruby/object:Gem::Version
|
|
58
58
|
version: '0'
|
|
59
59
|
requirements: []
|
|
60
|
-
rubygems_version:
|
|
60
|
+
rubygems_version: 4.0.3
|
|
61
61
|
specification_version: 4
|
|
62
62
|
summary: Ruby bindings for the Hnswlib.
|
|
63
63
|
test_files: []
|