



from .hash_table import HashTable
from .number_theory.prime_numbers import is_prime, next_prime


class       __lowerCamelCase	(   __lowercase    ):







   def __init__(self       ,	*lowerCamelCase       ,	**lowerCamelCase				):




      '''simple docstring'''




      super().__init__(*lowerCamelCase       ,	**lowerCamelCase				)







   def 							A__						(self       ,	lowerCamelCase       ,	lowerCamelCase				):




      '''simple docstring'''




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







   def 							A__						(self       ,	lowerCamelCase       ,	lowerCamelCase       ,	lowerCamelCase				):




      '''simple docstring'''




      return (increment * self.__hash_function_a(lowerCamelCase       ,	lowerCamelCase				)) % self.size_table







   def 							A__						(self       ,	lowerCamelCase       ,	lowerCamelCase=None				):




      '''simple docstring'''




      _lowerCAmelCase					     =		1
      _lowerCAmelCase					     =		self.hash_function(lowerCamelCase				)

      while self.values[new_key] is not None and self.values[new_key] != key:
         _lowerCAmelCase					     =		(
             self.__hash_double_function(lowerCamelCase       ,	lowerCamelCase       ,	lowerCamelCase				)
             if self.balanced_factor() >= self.lim_charge
             else None
         )
         if new_key is None:
            break
         else:
            i += 1

      return new_key




"""simple docstring"""





def 	__UpperCAmelCase					(       snake_case_  :  float   )							->	int:






   """simple docstring"""


   return int(snake_case_   ) if x - int(snake_case_   ) <= 0 else int(snake_case_   ) + 1


if __name__ == "__main__":
  import doctest

  doctest.testmod()