



'''simple docstring'''





def lowerCAmelCase  (__A  ,     __A):



     """simple docstring"""



     print('''\nVertex Distance''')
     for i in range(__A):
          if dist[i] != float('''inf'''):
               print(__A  ,     '''\t'''  ,     int(dist[i])  ,     end='''\t''')
          else:
               print(__A  ,     '''\t'''  ,     '''INF'''  ,     end='''\t''')
          print()




def lowerCAmelCase  (__A  ,     __A  ,     __A):



     """simple docstring"""



     _a     =  float('''inf''')
     _a     =  -1
     for i in range(__A):
          if (not vset[i]) and mdist[i] < min_val:
               _a     =  i
               _a     =  mdist[i]
     return min_ind




def lowerCAmelCase  (__A  ,     __A  ,     __A):



     """simple docstring"""



     _a     =  [float('''inf''') for _ in range(__A)]
     _a     =  [False for _ in range(__A)]
     _a     =  0.0

     for _ in range(v - 1):
          _a     =  min_dist(__A  ,     __A  ,     __A)
          _a     =  True

          for i in range(__A):
               if (
                   (not vset[i])
                   and graph[u][i] != float('''inf''')
                   and mdist[u] + graph[u][i] < mdist[i]
               ):
                    _a     =  mdist[u] + graph[u][i]

     print_dist(__A  ,     __A)


if __name__ == "__main__":
  lowercase_			=  int(input("Enter number of vertices: ").strip())
  lowercase_			=  int(input("Enter number of edges: ").strip())

  lowercase_			=  [[float("inf") for i in range(V)] for j in range(V)]

  for i in range(V):
    lowercase_			=  0.0

  for i in range(E):
    print("\nEdge ", i + 1)
    lowercase_			=  int(input("Enter source:").strip())
    lowercase_			=  int(input("Enter destination:").strip())
    lowercase_			=  float(input("Enter weight:").strip())
    lowercase_			=  weight

  lowercase_			=  int(input("\nEnter shortest path source:").strip())
  dijkstra(graph, V, gsrc)








'''simple docstring'''





import warnings
from collections.abc import Callable
from typing import Any

import numpy
from matplotlib import pyplot

lowercase_			=  0.25 + 0.0J
lowercase_			=  -0.4 + 0.6J
lowercase_			=  -0.1 + 0.651J
lowercase_			=  -2.0
lowercase_			=  56
lowercase_			=  2.0
lowercase_			=  666




def lowerCAmelCase  (__A  ,     __A):



     """simple docstring"""



     return numpy.exp(__A) + c_parameter




def lowerCAmelCase  (__A  ,     __A):



     """simple docstring"""



     return z_values * z_values + c_parameter




def lowerCAmelCase  (__A  ,     __A):



     """simple docstring"""



     _a     =  numpy.linspace(-window_size  ,     __A  ,     __A)
     _a     =  x.reshape((nb_pixels, 1))
     _a     =  numpy.linspace(-window_size  ,     __A  ,     __A)
     _a     =  y.reshape((1, nb_pixels))
     return x + 1.0J * y




def lowerCAmelCase  (__A  ,     __A  ,     __A  ,     __A  ,     __A = None  ,     ):



     """simple docstring"""



     _a     =  z_a.astype('''complex64''')
     for _ in range(__A):
          _a     =  eval_function(__A  ,     __A)
          if infinity is not None:
               numpy.nan_to_num(__A  ,     copy=__A  ,     nan=__A)
               _a     =  infinity
     return z_n




def lowerCAmelCase  (__A  ,     __A  ,     __A  ,     __A  ,     ):



     """simple docstring"""



     _a     =  (abs(__A)).transpose()
     _a     =  abs_z_final[::-1, :]
     pyplot.matshow(abs_z_final < escape_radius)
     pyplot.title(F'''Julia set of ${function_label}$, $c={function_params}$''')
     pyplot.show()




def lowerCAmelCase  ():



     """simple docstring"""



     warnings.filterwarnings(
         '''ignore'''  ,     category=__A  ,     message='''overflow encountered in multiply''')
     warnings.filterwarnings(
         '''ignore'''  ,     category=__A  ,     message='''invalid value encountered in multiply'''  ,     )
     warnings.filterwarnings(
         '''ignore'''  ,     category=__A  ,     message='''overflow encountered in absolute''')
     warnings.filterwarnings(
         '''ignore'''  ,     category=__A  ,     message='''overflow encountered in exp''')


if __name__ == "__main__":
  lowercase_			=  prepare_grid(window_size, nb_pixels)

  ignore_overflow_warnings()  # See file header for explanations

  lowercase_			=  24
  lowercase_			=  2 * abs(c_cauliflower) + 1
  lowercase_			=  iterate_function(
      eval_quadratic_polynomial,
      c_cauliflower,
      nb_iterations,
      z_a,
      infinity=1.1 * escape_radius,
  )
  show_results("z^2+c", c_cauliflower, escape_radius, z_final)

  lowercase_			=  64
  lowercase_			=  2 * abs(c_polynomial_a) + 1
  lowercase_			=  iterate_function(
      eval_quadratic_polynomial,
      c_polynomial_a,
      nb_iterations,
      z_a,
      infinity=1.1 * escape_radius,
  )
  show_results("z^2+c", c_polynomial_a, escape_radius, z_final)

  lowercase_			=  161
  lowercase_			=  2 * abs(c_polynomial_a) + 1
  lowercase_			=  iterate_function(
      eval_quadratic_polynomial,
      c_polynomial_a,
      nb_iterations,
      z_a,
      infinity=1.1 * escape_radius,
  )
  show_results("z^2+c", c_polynomial_a, escape_radius, z_final)

  lowercase_			=  12
  lowercase_			=  1_0000.0
  lowercase_			=  iterate_function(
      eval_exponential,
      c_exponential,
      nb_iterations,
      z_a + 2,
      infinity=1.0e10,
  )
  show_results("e^z+c", c_exponential, escape_radius, z_final)



