Skip to content

Commit

Permalink
First bugged LMDB version
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerollmops committed Nov 11, 2023
1 parent 0ff1b19 commit 10c661c
Show file tree
Hide file tree
Showing 7 changed files with 530 additions and 24 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ edition = "2021"
annoy-rs = { path = "../RuAnnoy" }
bytemuck = { version = "1.14.0", features = ["min_const_generics", "derive", "extern_crate_alloc"] }
byteorder = "1.5.0"
heed = "0.20.0-alpha.6"
ordered-float = "4.1.1"
tempfile = "3.8.1"
11 changes: 1 addition & 10 deletions src/arroy_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use crate::distance::{
};
use crate::node::{Node, NodeHeaderAngular, NodeHeaderDot, NodeHeaderMinkowski};
use crate::priority_queue::BinaryHeapItem;
use crate::DistanceType;

pub struct ArroyReader<'a> {
pub dimension: usize,
Expand Down Expand Up @@ -271,13 +272,3 @@ pub(crate) fn get_nth_descendant_id(
let child_offset = node_offset + offset_before_children + n * size_of::<i32>();
NativeEndian::read_i32(&storage[child_offset..]) as usize
}

#[derive(PartialEq, Eq, Debug, Copy, Clone)]
#[repr(u8)]
pub enum DistanceType {
Angular = 0,
Euclidean = 1,
Manhattan = 2,
// Hamming = 3,
Dot = 4,
}
Loading

0 comments on commit 10c661c

Please sign in to comment.