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

Method prepare_query

nodedb-vector/src/quantize/binary_codec.rs:77–79  ·  view source on GitHub ↗

Pre-encode the query to binary sign bits for fast Hamming comparison.

(&self, q: &[f32])

Source from the content-addressed store, hash-verified

75
76 /// Pre-encode the query to binary sign bits for fast Hamming comparison.
77 fn prepare_query(&self, q: &[f32]) -> Self::Query {
78 binary::encode(q)
79 }
80
81 /// Binary codec has no ADC table — returns `None`.
82 fn adc_lut(&self, _q: &Self::Query) -> Option<AdcLut> {

Calls 1

encodeFunction · 0.70