Пример #1
0
    def __hash_function_2(self, value, data):

        next_prime_gt = (
            next_prime(value % self.size_table)
            if not check_prime(value % self.size_table)
            else value % self.size_table
        )  # gt = bigger than
        return next_prime_gt - (data % next_prime_gt)
Пример #2
0
    def __hash_function_2(self, value, data):

        next_prime_gt = next_prime(value % self.size_table) \
            if not check_prime(value % self.size_table) else value % self.size_table  #gt = bigger than
        return next_prime_gt - (data % next_prime_gt)