


import math



class    UpperCAmelCase_	:
       '''simple docstring'''






       def __init__(     self ,					__SCREAMING_SNAKE_CASE=0						):  # a graph with Node 0,1,...,N-1




              """simple docstring"""




              UpperCamelCase    :	Optional[int]   	=		n
              UpperCamelCase    :	Union[str, Any]   	=		[
                  [math.inf for j in range(0 ,					UpperCamelCase_						)] for i in range(0 ,					UpperCamelCase_						)
              ]  # adjacency matrix for weight
              UpperCamelCase    :	str   	=		[
                  [math.inf for j in range(0 ,					UpperCamelCase_						)] for i in range(0 ,					UpperCamelCase_						)
              ]  # dp[i][j] stores minimum distance from i to j






       def  _lowercase   (     self ,					__SCREAMING_SNAKE_CASE ,					__SCREAMING_SNAKE_CASE ,					__SCREAMING_SNAKE_CASE						):




              """simple docstring"""




              UpperCamelCase    :	Dict   	=		w






       def  _lowercase   (     self						):




              """simple docstring"""




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






       def  _lowercase   (     self ,					__SCREAMING_SNAKE_CASE ,					__SCREAMING_SNAKE_CASE						):




              """simple docstring"""




              return self.dp[u][v]


if __name__ == "__main__":
  __UpperCAmelCase : 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)






from ...utils import (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
  if not (is_transformers_available() and is_torch_available()):
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  from ...utils.dummy_torch_and_transformers_objects import ShapEPipeline
else:
  from .camera import create_pan_cameras
  from .pipeline_shap_e import ShapEPipeline
  from .pipeline_shap_e_img2img import ShapEImgaImgPipeline
  from .renderer import (
      BoundingBoxVolume,
      ImportanceRaySampler,
      MLPNeRFModelOutput,
      MLPNeRSTFModel,
      ShapEParamsProjModel,
      ShapERenderer,
      StratifiedRaySampler,
      VoidNeRFModel,
  )

