



"""simple docstring"""







lowercase__		:				int          =	tuple[float, float, float]
lowercase__		:				Any          =	tuple[float, float, float]

def 				UpperCamelCase_    (    lowerCAmelCase__      :				Pointad    ,   lowerCAmelCase__      :				Pointad						)						->   Vectorad:

  """simple docstring"""




  lowerCAmelCase_   :				List[Any]								= end_pointa[0] - end_pointa[0]
  lowerCAmelCase_   :				Dict								= end_pointa[1] - end_pointa[1]
  lowerCAmelCase_   :				Optional[int]								= end_pointa[2] - end_pointa[2]
  return (x, y, z)

def 				UpperCamelCase_    (    lowerCAmelCase__      :				Vectorad    ,   lowerCAmelCase__      :				Vectorad						)						->   Vectorad:

  """simple docstring"""




  lowerCAmelCase_   :				List[Any]								= ab[1] * ac[2] - ab[2] * ac[1]  # *i
  lowerCAmelCase_   :				Dict								= (ab[0] * ac[2] - ab[2] * ac[0]) * -1  # *j
  lowerCAmelCase_   :				Tuple								= ab[0] * ac[1] - ab[1] * ac[0]  # *k
  return (x, y, z)

def 				UpperCamelCase_    (    lowerCAmelCase__      :				Vectorad    ,   lowerCAmelCase__      :				int						)						->   bool:

  """simple docstring"""




  return tuple(round(lowerCAmelCase__    ,   lowerCAmelCase__						) for x in vector						) == (0, 0, 0)

def 				UpperCamelCase_    (    lowerCAmelCase__      :				Pointad    ,   lowerCAmelCase__      :				Pointad    ,   lowerCAmelCase__      :				Pointad    ,   lowerCAmelCase__      :				int = 10						)						->   bool:

  """simple docstring"""




  lowerCAmelCase_   :				str								= create_vector(lowerCAmelCase__    ,   lowerCAmelCase__						)
  lowerCAmelCase_   :				Any								= create_vector(lowerCAmelCase__    ,   lowerCAmelCase__						)
  return is_zero_vector(get_ad_vectors_cross(lowerCAmelCase__    ,   lowerCAmelCase__						)    ,   lowerCAmelCase__						)










"""simple docstring"""







import random

def 				UpperCamelCase_    (    lowerCAmelCase__      :				int    ,   lowerCAmelCase__      :				float    ,   lowerCAmelCase__      :				bool = False						)						->   dict:

  """simple docstring"""




  lowerCAmelCase_   :				dict								= {i: [] for i in range(lowerCAmelCase__						)}

  # if probability is greater or equal than 1, then generate a complete graph
  if probability >= 1:
    return complete_graph(lowerCAmelCase__						)
  # if probability is lower or equal than 0, then return a graph without edges
  if probability <= 0:
    return graph

  # for each couple of nodes, add an edge from u to v
  # if the number randomly generated is greater than probability probability
  for i in range(lowerCAmelCase__						):
    for j in range(i + 1    ,   lowerCAmelCase__						):
      if random.random() < probability:
        graph[i].append(lowerCAmelCase__						)
        if not directed:
          # if the graph is undirected, add an edge in from j to i, either
          graph[j].append(lowerCAmelCase__						)
  return graph

def 				UpperCamelCase_    (    lowerCAmelCase__      :				int						)						->   dict:

  """simple docstring"""




  return {
      i: [j for j in range(lowerCAmelCase__						) if i != j] for i in range(lowerCAmelCase__						)
  }


if __name__ == "__main__":
     import doctest

     doctest.testmod()





