Skip to content

Commit

Permalink
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
Browse files Browse the repository at this point in the history
… main-dev
  • Loading branch information
ashvardanian committed Oct 24, 2023
2 parents 799284c + 50b38f5 commit 5ff8e83
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors:
given-names: "Ash"
orcid: "https://orcid.org/0000-0002-4882-1815"
title: "USearch by Unum Cloud"
version: 2.7.7
version: 2.7.8
doi: 10.5281/zenodo.7949416
date-released: 2023-10-22
url: "https://github.com/unum-cloud/usearch"
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "usearch"
version = "2.7.7"
version = "2.7.8"
authors = ["Ash Vardanian <[email protected]>"]
description = "Smaller & Faster Single-File Vector Search Engine from Unum"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ doi = {10.5281/zenodo.7949416},
author = {Vardanian, Ash},
title = {{USearch by Unum Cloud}},
url = {https://github.com/unum-cloud/usearch},
version = {2.7.7},
version = {2.7.8},
year = {2023},
month = oct,
}
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.7
2.7.8
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class USearchConan(ConanFile):

name = "usearch"
version = '2.7.7'
version = '2.7.8'
license = "Apache-2.0"
description = "Smaller & Faster Single-File Vector Search Engine from Unum"
homepage = "https://github.com/unum-cloud/usearch"
Expand Down
2 changes: 1 addition & 1 deletion csharp/nuget/nuget-package.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<Version Condition="'$(Version)' == ''">2.7.7</Version>
<Version Condition="'$(Version)' == ''">2.7.8</Version>

<Authors>Unum</Authors>
<Company>Unum</Company>
Expand Down
2 changes: 1 addition & 1 deletion include/usearch/index.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#define USEARCH_VERSION_MAJOR 2
#define USEARCH_VERSION_MINOR 7
#define USEARCH_VERSION_PATCH 7
#define USEARCH_VERSION_PATCH 8

// Inferring C++ version
// https://stackoverflow.com/a/61552074
Expand Down
11 changes: 4 additions & 7 deletions include/usearch/index_plugins.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1184,15 +1184,12 @@ template <typename scalar_at = float, typename result_at = float> struct metric_
}
};

#include <cmath>
#include <vector>

/**
* @brief Measures Jensen-Shannon Divergence between two probability distributions.
*/
template <typename scalar_t = float, typename result_t = float> struct metric_divergence_gt {
using scalar_t = scalar_t;
using result_t = result_t;
template <typename scalar_at = float, typename result_at = float> struct metric_divergence_gt {
using scalar_t = scalar_at;
using result_t = result_at;

inline result_t operator()(scalar_t const* p, scalar_t const* q, std::size_t dim) const noexcept {
result_t kld_pm{}, kld_qm{};
Expand All @@ -1205,7 +1202,7 @@ template <typename scalar_t = float, typename result_t = float> struct metric_di
#pragma GCC ivdep
#endif
for (std::size_t i = 0; i != dim; ++i) {
scalar_t mi = (p[i] + q[i]) / 2 + epsilon;
result_t mi = result_t(p[i] + q[i]) / 2 + epsilon;
kld_pm += p[i] * std::log((p[i] + epsilon) / mi);
kld_qm += q[i] * std::log((q[i] + epsilon) / mi);
}
Expand Down
1 change: 1 addition & 0 deletions objc/include/USearchObjective.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ typedef NS_ENUM(NSUInteger, USearchMetric) {
USearchMetricL2sq,
USearchMetricPearson,
USearchMetricHaversine,
USearchMetricDivergence,
USearchMetricJaccard,
USearchMetricHamming,
USearchMetricTanimoto,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "usearch",
"version": "2.7.7",
"version": "2.7.8",
"description": "Smaller & Faster Single-File Vector Search Engine from Unum",
"author": "Ash Vardanian (https://ashvardanian.com/)",
"license": "Apache 2.0",
Expand Down
2 changes: 1 addition & 1 deletion wasmer.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name="unum/usearch"
version="2.7.7"
version="2.7.8"
description="Smaller & Faster Single-File Vector Search Engine from Unum"
license="Apache-2.0"
readme="README.md"
Expand Down

0 comments on commit 5ff8e83

Please sign in to comment.