public function dist(&$A, &$B)
    {
        $h1 = $this->simhash($A);
        $h2 = $this->simhash($B);
        $d = 0;
        for ($i=0;$i<$this->length;$i++) {
            if ($h1[$i]!=$h2[$i])
                $d++;
        }

        return $d;
    }
public function dist(&$A, &$B)
    {
        $h1 = $this->simhash($A);
        $h2 = $this->simhash($B);
        $d = 0;
        for ($i=0;$i<$this->length;$i++) {
            if ($h1[$i]!=$h2[$i])
                $d++;
        }

        return $d;
    }
public function dist ( & $ A , & $ B ) { $ h1 = $ this -> simhash ( $ A ) ; $ h2 = $ this -> simhash ( $ B ) ; $ d = 0 ; for ( $ i = 0 ; $ i < $ this -> length ; $ i ++ ) { if ( $ h1 [ $ i ] != $ h2 [ $ i ] ) $ d ++ ; } return $ d ; }
Computes the hamming distance of the simhashes of two sets.

@param  array $A
@param  array $B
@return int   [0,$this->length]
Computes the hamming distance of the simhashes of two sets .