single_utilities/types/
mod.rs

1use std::hash::Hash;
2
3pub enum Direction {
4    COLUMN,
5    ROW,
6}
7
8impl Clone for Direction {
9    fn clone(&self) -> Self {
10        match self {
11            Self::ROW => Self::ROW,
12            Self::COLUMN => Self::COLUMN,
13        }
14    }
15}
16
17impl Direction {
18    pub fn is_row(&self) -> bool {
19        match self {
20            Self::ROW => true,
21            Self::COLUMN => false,
22        }
23    }
24}
25
26pub trait BatchIdentifier: Clone + Eq + Hash {}
27
28// Implement BatchIdentifier for common types
29impl BatchIdentifier for String {}
30impl BatchIdentifier for &str {}
31impl BatchIdentifier for i32 {}
32impl BatchIdentifier for u32 {}
33impl BatchIdentifier for usize {}
34
35#[derive(Debug, Clone, Copy)]
36pub enum DistanceMetric {
37    /// Euclidean distance
38    Euclidean,
39    /// Manhattan distance
40    Manhattan,
41    /// Cosine distance
42    Cosine,
43}