
"""simple docstring"""






import numpy as np





def __A						(   a_ :							np.array     )->							List[str]:




		'''simple docstring'''






		return (2 / (1 + np.exp(-2 * vector     ))) - 1


if __name__ == "__main__":
					import doctest

					doctest.testmod()







"""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)





