(store: &'a HashMap<u32, Vec<f32>>)
| 206 | } |
| 207 | |
| 208 | fn fetch<'a>(store: &'a HashMap<u32, Vec<f32>>) -> impl FnMut(u32) -> Option<&'a [f32]> { |
| 209 | move |id| store.get(&id).map(|v| v.as_slice()) |
| 210 | } |
| 211 | |
| 212 | /// Stub codec that encodes as raw LE f32 bytes and computes L2 distance. |
| 213 | /// Reports `CodecName::Binary` so tests can request it via `VectorQuantization::Binary`. |