(&self, a_idx: u32, b_idx: u32)
| 244 | /// Symmetric distance between two nodes identified by their dense indices. |
| 245 | #[inline] |
| 246 | pub(crate) fn sym_dist(&self, a_idx: u32, b_idx: u32) -> f32 { |
| 247 | let a = &self.nodes[a_idx as usize].quantized; |
| 248 | let b = &self.nodes[b_idx as usize].quantized; |
| 249 | // Both borrows are read-only; safe even through raw pointers if |
| 250 | // called for distinct indices, but here we just borrow directly. |
| 251 | self.codec.fast_symmetric_distance(a, b) |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | #[cfg(test)] |
no test coverage detected