def estimate(self):
        """ Returns the estimate of the cardinality """
        E = self.alpha * float(self.m ** 2) / np.power(2.0, - self.M).sum()
        if E <= 2.5 * self.m:             # Small range correction
            V = self.m - np.count_nonzero(self.M)
            return int(self.m * np.log(self.m / float(V))) if V > 0 else int(E)
        # intermidiate range correction -> No correction
        elif E <= float(long(1) << self.precision) / 30.0:
            return int(E)
        else:
            return int(-(long(1) << self.precision) *
                       np.log(1.0 - E / (long(1) << self.precision)))
def estimate ( self ) : E = self . alpha * float ( self . m ** 2 ) / np . power ( 2.0 , - self . M ) . sum ( ) if E <= 2.5 * self . m : V = self . m - np . count_nonzero ( self . M ) return int ( self . m * np . log ( self . m / float ( V ) ) ) if V > 0 else int ( E ) elif E <= float ( long ( 1 ) << self . precision ) / 30.0 : return int ( E ) else : return int ( - ( long ( 1 ) << self . precision ) * np . log ( 1.0 - E / ( long ( 1 ) << self . precision ) ) )
Returns the estimate of the cardinality