MCPcopy Create free account
hub / github.com/carsonpo/haystackdb / compute_hash

Method compute_hash

src/structures/wal.rs:335–350  ·  view source on GitHub ↗
(
        &self,
        vectors: &Vec<[u8; QUANTIZED_VECTOR_SIZE]>,
        kvs: &Vec<Vec<KVPair>>,
    )

Source from the content-addressed store, hash-verified

333 }
334
335 pub fn compute_hash(
336 &self,
337 vectors: &Vec<[u8; QUANTIZED_VECTOR_SIZE]>,
338 kvs: &Vec<Vec<KVPair>>,
339 ) -> u64 {
340 let mut hasher = DefaultHasher::default();
341
342 // for vector in vectors {
343 // vector.hash(&mut hasher);
344 // }
345 vectors.hash(&mut hasher);
346
347 kvs.hash(&mut hasher);
348
349 hasher.finish()
350 }
351
352 pub fn add_to_wal(
353 &mut self,

Callers 2

add_to_walMethod · 0.80
batch_add_to_walMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected