Skip to content

Commit 26d5094

Browse files
author
Ian
committed
added distance metric
1 parent ba51ec6 commit 26d5094

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "single-utilities"
3-
version = "0.7.0"
3+
version = "0.8.0"
44
edition = "2024"
55
description = "This crate provdes types, traits and utility functions to the single-rust ecosystem that can be universally used. You can also use it within your own ecosystem 👀"
66
homepage = "https://singlerust.com"

src/types/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,12 @@ impl BatchIdentifier for i32 {}
3232
impl BatchIdentifier for u32 {}
3333
impl BatchIdentifier for usize {}
3434

35+
#[derive(Debug, Clone, Copy)]
36+
pub enum DistanceMetric {
37+
/// Euclidean distance
38+
Euclidean,
39+
/// Manhattan distance
40+
Manhattan,
41+
/// Cosine distance
42+
Cosine,
43+
}

0 commit comments

Comments
 (0)