usearch 2.21.2 → 2.21.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.
@@ -10,7 +10,7 @@
10
10
  #include <node_api.h> // `napi_*` functions
11
11
  #include <simsimd/simsimd.h> // `simsimd_*` functions
12
12
 
13
- /// @brief Global variable that caches the CPU capabilities, and is computed just onc, when the module is loaded.
13
+ /// @brief Global variable that caches the CPU capabilities, and is computed just once, when the module is loaded.
14
14
  simsimd_capability_t static_capabilities = simsimd_cap_serial_k;
15
15
 
16
16
  napi_value dense(napi_env env, napi_callback_info info, simsimd_metric_kind_t metric_kind,
@@ -12,7 +12,7 @@ try {
12
12
  } catch (e) {
13
13
  compiled = fallback;
14
14
  console.warn(
15
- "It seems like your environment does't support the native simsimd module, so we are providing a JS fallback."
15
+ "It seems like your environment doesn't support the native simsimd module, so we are providing a JS fallback."
16
16
  );
17
17
  }
18
18
 
@@ -92,10 +92,10 @@ export const hamming = (a: Uint8Array, b: Uint8Array): number => {
92
92
  };
93
93
 
94
94
  /**
95
- * @brief Computes the bitwise Jaccard similarity coefficient between two vectors.
95
+ * @brief Computes the bitwise Jaccard distance between two vectors.
96
96
  * @param {Uint8Array} a - The first vector.
97
97
  * @param {Uint8Array} b - The second vector.
98
- * @returns {number} The Jaccard similarity coefficient between vectors a and b.
98
+ * @returns {number} The Jaccard distance between vectors a and b.
99
99
  */
100
100
  export const jaccard = (a: Uint8Array, b: Uint8Array): number => {
101
101
  return compiled.jaccard(a, b);
@@ -123,7 +123,7 @@ export const jensenshannon = (a: Float64Array | Float32Array, b: Float64Array |
123
123
 
124
124
  /**
125
125
  * Quantizes a floating-point vector into a binary vector (1 for positive values, 0 for non-positive values) and packs the result into a Uint8Array, where each element represents 8 binary values from the original vector.
126
- * This function is useful for preparing data for bitwise distance or similarity computations, such as Hamming or Jaccard indices.
126
+ * This function is useful for preparing data for bitwise distance computations, such as Hamming or Jaccard indices.
127
127
  *
128
128
  * @param {Float32Array | Float64Array | Int8Array} vector The floating-point vector to be quantized and packed.
129
129
  * @returns {Uint8Array} A Uint8Array where each byte represents 8 binary quantized values from the input vector.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simsimd",
3
- "version": "6.5.1",
3
+ "version": "6.5.5",
4
4
  "description": "Portable mixed-precision BLAS-like vector math library for x86 and ARM",
5
5
  "homepage": "https://github.com/ashvardanian/simsimd",
6
6
  "author": "Ash Vardanian",