We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 870fa98 commit c67cdc7Copy full SHA for c67cdc7
src/distance/hamming.rs
@@ -107,6 +107,19 @@ impl Distance for Hamming {
107
p.as_bytes().iter().zip(q.as_bytes()).map(|(u, v)| (u & v).count_ones()).sum::<u32>();
108
ret as f32
109
}
110
+
111
+ fn side<R: Rng>(
112
+ normal_plane: &UnalignedVector<Self::VectorCodec>,
113
+ node: &Leaf<Self>,
114
+ rng: &mut R,
115
+ ) -> Side {
116
+ let dot = Self::margin_no_header(&node.vector, normal_plane);
117
+ if dot > 0.0 {
118
+ Side::Right
119
+ } else {
120
+ Side::Left
121
+ }
122
123
124
125
#[inline]
0 commit comments