pub fn hash(&self, feature: &BitArray<B>) -> BitArray<H> {
        let mut hash = BitArray::zeros();
        for (ix, word) in self.codewords.iter().enumerate() {
            // This makes sure to alternate between less than and less than or equal to every other codeword.
            hash[ix >> 3] |= ((feature.distance(word) <= Self::threshold()) as u8) << (ix & 0b111);
        }
        hash
    }
/// Convert the input feature into a hash.
Convert the input feature into a hash.
Convert the input feature into a hash .
pub fn hash(&self, feature: &BitArray<B>) -> BitArray<H> {
        let mut hash = BitArray::zeros();
        for (ix, word) in self.codewords.iter().enumerate() {
            // This makes sure to alternate between less than and less than or equal to every other codeword.
            hash[ix >> 3] |= ((feature.distance(word) <= Self::threshold()) as u8) << (ix & 0b111);
        }
        hash
    }
pub fn hash ( & self , feature : & BitArray < B > ) -> BitArray < H > { let mut hash = BitArray :: zeros ( ) ; for ( ix , word ) in self . codewords . iter ( ) . enumerate ( ) { // This makes sure to alternate between less than and less than or equal to every other codeword. hash [ ix >> 3 ] |= ( ( feature . distance ( word ) <= Self :: threshold ( ) ) as u8 ) << ( ix & 0b111 ) ; } hash }
Convert the input feature into a hash.
Convert the input feature into a hash .
&self
feature
&BitArray<B>
&self
feature
&BitArray<B>