
"""simple docstring"""






from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCamelCase__ :       int						     =			logging.get_logger(__name__)

lowerCamelCase__ :       List[Any]						     =			{
    "google/canine-s": "https://huggingface.co/google/canine-s/resolve/main/config.json",
    # See all CANINE models at https://huggingface.co/models?filter=canine
}




class 				lowercase__(				_UpperCAmelCase   ):
	'''simple docstring'''

	UpperCamelCase				=  """canine"""





	def __init__(						self    :List[str]		, lowerCamelCase_    :Dict=7_68		, lowerCamelCase_    :Tuple=12		, lowerCamelCase_    :List[Any]=12		, lowerCamelCase_    :Optional[int]=30_72		, lowerCamelCase_    :Tuple="gelu"		, lowerCamelCase_    :List[Any]=0.1		, lowerCamelCase_    :Optional[Any]=0.1		, lowerCamelCase_    :List[Any]=1_63_84		, lowerCamelCase_    :List[Any]=16		, lowerCamelCase_    :Any=0.0_2		, lowerCamelCase_    :List[str]=1E-12		, lowerCamelCase_    :int=0		, lowerCamelCase_    :Optional[int]=0xE000		, lowerCamelCase_    :List[Any]=0xE001		, lowerCamelCase_    :Union[str, Any]=4		, lowerCamelCase_    :str=4		, lowerCamelCase_    :str=8		, lowerCamelCase_    :Tuple=1_63_84		, lowerCamelCase_    :Dict=1_28		, **lowerCamelCase_    :Optional[int]		, )							->			int:







			'''simple docstring'''




			super().__init__(pad_token_id=lowerCamelCase_		, bos_token_id=lowerCamelCase_		, eos_token_id=lowerCamelCase_		, **lowerCamelCase_					)

			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= max_position_embeddings
			SCREAMING_SNAKE_CASE       :     List[Any]				= hidden_size
			SCREAMING_SNAKE_CASE       :     str				= num_hidden_layers
			SCREAMING_SNAKE_CASE       :     List[Any]				= num_attention_heads
			SCREAMING_SNAKE_CASE       :     Optional[Any]				= intermediate_size
			SCREAMING_SNAKE_CASE       :     Any				= hidden_act
			SCREAMING_SNAKE_CASE       :     Union[str, Any]				= hidden_dropout_prob
			SCREAMING_SNAKE_CASE       :     int				= attention_probs_dropout_prob
			SCREAMING_SNAKE_CASE       :     List[Any]				= initializer_range
			SCREAMING_SNAKE_CASE       :     Dict				= type_vocab_size
			SCREAMING_SNAKE_CASE       :     Optional[Any]				= layer_norm_eps

			# Character config:
			SCREAMING_SNAKE_CASE       :     Any				= downsampling_rate
			SCREAMING_SNAKE_CASE       :     List[Any]				= upsampling_kernel_size
			SCREAMING_SNAKE_CASE       :     List[Any]				= num_hash_functions
			SCREAMING_SNAKE_CASE       :     Dict				= num_hash_buckets
			SCREAMING_SNAKE_CASE       :     str				= local_transformer_stride







"""simple docstring"""






import math




class 				lowercase__:
	'''simple docstring'''

	def __init__(						self    :Union[str, Any]		, lowerCamelCase_    :List[str]=0					)							->			List[Any]:  # a graph with Node 0,1,...,N-1







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Tuple				= n
			SCREAMING_SNAKE_CASE       :     List[Any]				= [
			    [math.inf for j in range(0		, lowerCamelCase_					)] for i in range(0		, lowerCamelCase_					)
			]  # adjacency matrix for weight
			SCREAMING_SNAKE_CASE       :     Any				= [
			    [math.inf for j in range(0		, lowerCamelCase_					)] for i in range(0		, lowerCamelCase_					)
			]  # dp[i][j] stores minimum distance from i to j





	def   __lowerCAmelCase (						self    :Dict		, lowerCamelCase_    :Optional[int]		, lowerCamelCase_    :Union[str, Any]		, lowerCamelCase_    :Union[str, Any]					)							->			Tuple:







			'''simple docstring'''




			SCREAMING_SNAKE_CASE       :     Optional[Any]				= w





	def   __lowerCAmelCase (						self    :str					)							->			Union[str, Any]:







			'''simple docstring'''




			for k in range(0		, self.n					):
					for i in range(0		, self.n					):
							for j in range(0		, self.n					):
									SCREAMING_SNAKE_CASE       :     List[str]				= min(self.dp[i][j]		, self.dp[i][k] + self.dp[k][j]					)







	def   __lowerCAmelCase (						self    :int		, lowerCamelCase_    :Union[str, Any]		, lowerCamelCase_    :Optional[int]					)							->			Optional[Any]:







			'''simple docstring'''




			return self.dp[u][v]


if __name__ == "__main__":
					lowerCamelCase__ :       Dict						     =			Graph(5)
					graph.add_edge(0, 2, 9)
					graph.add_edge(0, 4, 10)
					graph.add_edge(1, 3, 5)
					graph.add_edge(2, 3, 7)
					graph.add_edge(3, 0, 10)
					graph.add_edge(3, 1, 2)
					graph.add_edge(3, 2, 1)
					graph.add_edge(3, 4, 6)
					graph.add_edge(4, 1, 3)
					graph.add_edge(4, 2, 4)
					graph.add_edge(4, 3, 9)
					graph.floyd_warshall()
					graph.show_min(1, 4)
					graph.show_min(0, 3)





