"""simple docstring"""







from __future__ import annotations






class      _SCREAMING_SNAKE_CASE							:



   '''simple docstring'''



   def __init__(	self ,				_SCREAMING_SNAKE_CASE	):


      '''simple docstring'''

      __lowerCamelCase    		=					vertices
      __lowerCamelCase    		=					[[0] * vertices for _ in range(__UpperCamelCase	)]







   def    _A				(	self ,				_SCREAMING_SNAKE_CASE	):


      '''simple docstring'''

      print('Vertex \t Distance from Source'	)
      for vertex in range(self.vertices	):
         print(__UpperCamelCase ,				'\t\t' ,				distances_from_source[vertex]	)







   def    _A				(	self ,				_SCREAMING_SNAKE_CASE ,				_SCREAMING_SNAKE_CASE	):


      '''simple docstring'''

      __lowerCamelCase    		=					1E7
      __lowerCamelCase    		=					0

      # Search not nearest vertex not in the shortest path tree
      for vertex in range(self.vertices	):
         if distances_from_source[vertex] < minimum and visited[vertex] is False:
            __lowerCamelCase    		=					distances_from_source[vertex]
            __lowerCamelCase    		=					vertex
      return min_index







   def    _A				(	self ,				_SCREAMING_SNAKE_CASE	):


      '''simple docstring'''

      __lowerCamelCase    		=					[int(1E7	)] * self.vertices  # distances from the source
      __lowerCamelCase    		=					0
      __lowerCamelCase    		=					[False] * self.vertices

      for _ in range(self.vertices	):
         __lowerCamelCase    		=					self.minimum_distance(__UpperCamelCase ,				__UpperCamelCase	)
         __lowerCamelCase    		=					True

         # Update dist value of the adjacent vertices
         # of the picked vertex only if the current
         # distance is greater than new distance and
         # the vertex in not in the shortest path tree
         for v in range(self.vertices	):
            if (
                self.graph[u][v] > 0
                and visited[v] is False
                and distances[v] > distances[u] + self.graph[u][v]
            ):
               __lowerCamelCase    		=					distances[u] + self.graph[u][v]

      self.print_solution(__UpperCamelCase	)


if __name__ == "__main__":
     _SCREAMING_SNAKE_CASE	:		Union[str, Any]   =   Graph(9)
     _SCREAMING_SNAKE_CASE	:		Optional[int]   =   [
         [0, 4, 0, 0, 0, 0, 0, 8, 0],
         [4, 0, 8, 0, 0, 0, 0, 1_1, 0],
         [0, 8, 0, 7, 0, 4, 0, 0, 2],
         [0, 0, 7, 0, 9, 1_4, 0, 0, 0],
         [0, 0, 0, 9, 0, 1_0, 0, 0, 0],
         [0, 0, 4, 1_4, 1_0, 0, 2, 0, 0],
         [0, 0, 0, 0, 0, 2, 0, 1, 6],
         [8, 1_1, 0, 0, 0, 0, 1, 0, 7],
         [0, 0, 2, 0, 0, 0, 6, 7, 0],
     ]
     graph.dijkstra(0)







from ...utils import is_transformers_available
from .pipeline_latent_diffusion_superresolution import LDMSuperResolutionPipeline


if is_transformers_available():
				from .pipeline_latent_diffusion import LDMBertModel, LDMTextToImagePipeline


