MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / encode

Method encode

nodedb-codec/src/vector_quant/opq.rs:299–302  ·  view source on GitHub ↗
(&self, v: &[f32])

Source from the content-addressed store, hash-verified

297 type Query = OpqQuery;
298
299 fn encode(&self, v: &[f32]) -> Self::Quantized {
300 let (codes, uqv) = self.encode_inner(v);
301 OpqQuantized { codes, uqv }
302 }
303
304 /// Rotate the query, then build flat ADC distance table `[M × K]`.
305 fn prepare_query(&self, q: &[f32]) -> Self::Query {

Callers 3

encode_produces_m_bytesFunction · 0.45
distance_is_non_negativeFunction · 0.45

Calls 1

encode_innerMethod · 0.45

Tested by 3

encode_produces_m_bytesFunction · 0.36
distance_is_non_negativeFunction · 0.36