



import math



class 	lowerCamelCase__      :




		'''simple docstring'''



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

						"""simple docstring"""






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

						"""simple docstring"""






						lowerCAmelCase__					:    List[Any]												=					w



		def 		lowerCAmelCase__				(self			)					->      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			):
																		lowerCAmelCase__					:    Dict												=					min(self.dp[i][j]		,self.dp[i][k] + self.dp[k][j]			)



		def 		lowerCAmelCase__				(self		,__lowerCamelCase		,__lowerCamelCase			)					->      Optional[Any]:

						"""simple docstring"""






						return self.dp[u][v]


if __name__ == "__main__":
							__snake_case    :		Union[str, Any]  =Graph(5)
							graph.add_edge(0, 2, 9)
							graph.add_edge(0, 4, 1_0)
							graph.add_edge(1, 3, 5)
							graph.add_edge(2, 3, 7)
							graph.add_edge(3, 0, 1_0)
							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)






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


__snake_case    :		str  ={
    'configuration_conditional_detr': [
        'CONDITIONAL_DETR_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'ConditionalDetrConfig',
        'ConditionalDetrOnnxConfig',
    ]
}

try:
							if not is_vision_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__snake_case    :		Tuple  =['ConditionalDetrFeatureExtractor']
							__snake_case    :		Union[str, Any]  =['ConditionalDetrImageProcessor']

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__snake_case    :		List[str]  =[
							    'CONDITIONAL_DETR_PRETRAINED_MODEL_ARCHIVE_LIST',
							    'ConditionalDetrForObjectDetection',
							    'ConditionalDetrForSegmentation',
							    'ConditionalDetrModel',
							    'ConditionalDetrPreTrainedModel',
							]


if TYPE_CHECKING:
							from .configuration_conditional_detr import (
							    CONDITIONAL_DETR_PRETRAINED_CONFIG_ARCHIVE_MAP,
							    ConditionalDetrConfig,
							    ConditionalDetrOnnxConfig,
							)

							try:
														if not is_vision_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .feature_extraction_conditional_detr import ConditionalDetrFeatureExtractor
														from .image_processing_conditional_detr import ConditionalDetrImageProcessor

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_conditional_detr import (
														    CONDITIONAL_DETR_PRETRAINED_MODEL_ARCHIVE_LIST,
														    ConditionalDetrForObjectDetection,
														    ConditionalDetrForSegmentation,
														    ConditionalDetrModel,
														    ConditionalDetrPreTrainedModel,
														)

else:
							import sys

							__snake_case    :		str  =_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)

