






"""simple docstring"""





from __future__ import annotations
class  __lowerCamelCase     :

   def __init__(       self			,					snake_case_   )		->							None:
       UpperCamelCase__								=     vertices
       UpperCamelCase__								=     [[0] * vertices for _ in range(snake_case_   )]

   def     SCREAMING_SNAKE_CASE__			(       self			,					snake_case_   )		->							None:
       print('Vertex \t Distance from Source'   )
       for vertex in range(self.vertices   ):
           print(snake_case_			,					'\t\t'			,					distances_from_source[vertex]   )

   def     SCREAMING_SNAKE_CASE__			(       self			,					snake_case_			,					snake_case_   )		->							int:
       UpperCamelCase__								=     1E7
       UpperCamelCase__								=     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:
               UpperCamelCase__								=     distances_from_source[vertex]
               UpperCamelCase__								=     vertex
       return min_index







   def     SCREAMING_SNAKE_CASE__			(       self			,					snake_case_   )		->							None:
       UpperCamelCase__								=     [int(1E7   )] * self.vertices  # distances from the source
       UpperCamelCase__								=     0
       UpperCamelCase__								=     [False] * self.vertices

       for _ in range(self.vertices   ):
           UpperCamelCase__								=     self.minimum_distance(snake_case_			,					snake_case_   )
           UpperCamelCase__								=     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]
               ):
                   UpperCamelCase__								=     distances[u] + self.graph[u][v]

       self.print_solution(snake_case_   )


if __name__ == "__main__":
  A__       :			Dict=						Graph(9)
  A__       :			List[Any]=						[
      [0, 4, 0, 0, 0, 0, 0, 8, 0],
      [4, 0, 8, 0, 0, 0, 0, 11, 0],
      [0, 8, 0, 7, 0, 4, 0, 0, 2],
      [0, 0, 7, 0, 9, 14, 0, 0, 0],
      [0, 0, 0, 9, 0, 10, 0, 0, 0],
      [0, 0, 4, 14, 10, 0, 2, 0, 0],
      [0, 0, 0, 0, 0, 2, 0, 1, 6],
      [8, 11, 0, 0, 0, 0, 1, 0, 7],
      [0, 0, 2, 0, 0, 0, 6, 7, 0],
  ]
  graph.dijkstra(0)












"""simple docstring"""





import torch

from transformers import PreTrainedModel

from .custom_configuration import CustomConfig, NoSuperInitConfig
class  __lowerCamelCase     (	_a	):
   a   :					List[Any]			    =CustomConfig

   def __init__(       self			,					snake_case_   )		->							str:
       super().__init__(snake_case_   )
       UpperCamelCase__								=     torch.nn.Linear(config.hidden_size			,					config.hidden_size   )

   def     SCREAMING_SNAKE_CASE__			(       self			,					snake_case_   )		->							Optional[int]:
       return self.linear(snake_case_   )







   def     SCREAMING_SNAKE_CASE__			(       self			,					snake_case_   )		->							Union[str, Any]:
       pass







class  __lowerCamelCase     (	_a	):
   a   :					Optional[int]			    =NoSuperInitConfig

   def __init__(       self			,					snake_case_   )		->							Optional[int]:
       super().__init__(snake_case_   )
       UpperCamelCase__								=     torch.nn.Linear(config.attribute			,					config.attribute   )

   def     SCREAMING_SNAKE_CASE__			(       self			,					snake_case_   )		->							int:
       return self.linear(snake_case_   )







   def     SCREAMING_SNAKE_CASE__			(       self			,					snake_case_   )		->							Union[str, Any]:
       pass




