


'''simple docstring'''



import math






class 	UpperCamelCase__:




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

										"""simple docstring"""




										UpperCAmelCase					    =     n
										UpperCAmelCase					    =     [
										    [math.inf for j in range(0				,   lowerCAmelCase				)] for i in range(0				,   lowerCAmelCase				)
										]  # adjacency matrix for weight
										UpperCAmelCase					    =     [
										    [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 					a__(		self      :			Union[str, Any]				,   lowerCAmelCase      :			List[Any]				,   lowerCAmelCase      :			Optional[int]				,   lowerCAmelCase      :			str				)->					Optional[int]:

										"""simple docstring"""




										UpperCAmelCase					    =     w




				def 					a__(		self      :			Optional[int]				)->					Optional[Any]:

										"""simple docstring"""




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





				def 					a__(		self      :			int				,   lowerCAmelCase      :			int				,   lowerCAmelCase      :			Dict				)->					List[str]:

										"""simple docstring"""




										return self.dp[u][v]


if __name__ == "__main__":
	_lowercase      :      Optional[int]            =					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)









'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_lowercase      :      List[str]            =					{
    """configuration_time_series_transformer""": [
        """TIME_SERIES_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """TimeSeriesTransformerConfig""",
    ],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	_lowercase      :      Dict            =					[
	    """TIME_SERIES_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """TimeSeriesTransformerForPrediction""",
	    """TimeSeriesTransformerModel""",
	    """TimeSeriesTransformerPreTrainedModel""",
	]


if TYPE_CHECKING:
	from .configuration_time_series_transformer import (
	    TIME_SERIES_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
	    TimeSeriesTransformerConfig,
	)

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_time_series_transformer import (
		    TIME_SERIES_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
		    TimeSeriesTransformerForPrediction,
		    TimeSeriesTransformerModel,
		    TimeSeriesTransformerPreTrainedModel,
		)

else:
	import sys

	_lowercase      :      Tuple            =					_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)





