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

Function high_dimensional_encoding

nodedb-vector/src/quantize/binary.rs:138–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

136
137 #[test]
138 fn high_dimensional_encoding() {
139 // 768 dimensions = 96 bytes.
140 let v: Vec<f32> = (0..768).map(|i| (i as f32).sin()).collect();
141 let bits = encode(&v);
142 assert_eq!(bits.len(), 96);
143 }
144
145 #[test]
146 fn batch_encode_layout() {

Callers

nothing calls this directly

Calls 2

collectMethod · 0.80
encodeFunction · 0.70

Tested by

no test coverage detected