Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Rustixir/darkbird
/ Vector
Class
Vector
src/darkbird/vector.rs:11–11 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
9
10
#[derive(Clone, Serialize, Deserialize, PartialEq, Debug)]
11
pub struct Vector(pub Vec<f32>);
12
13
impl Vector {
14
/// Calculates the Euclidean distance between two vectors.
Callers
7
main
Function · 0.85
insert
Method · 0.85
lookup
Method · 0.85
vector_addition
Method · 0.85
vector_subtraction
Method · 0.85
vector_scaling
Method · 0.85
k_nearest_neighbors
Function · 0.85
Calls
no outgoing calls
Tested by
1
k_nearest_neighbors
Function · 0.68