


"""simple docstring"""

from math import log

from scipy.constants import Boltzmann, physical_constants

UpperCAmelCase__  							=300  # TEMPERATURE (unit = K)


def lowerCAmelCase_      (				UpperCamelCase__	: float				,   UpperCamelCase__	: float				,   UpperCamelCase__	: float				,   ):






 """simple docstring"""







 if donor_conc <= 0:
  raise ValueError("""Donor concentration should be positive""" )
 elif acceptor_conc <= 0:
  raise ValueError("""Acceptor concentration should be positive""" )
 elif intrinsic_conc <= 0:
  raise ValueError("""Intrinsic concentration should be positive""" )
 elif donor_conc <= intrinsic_conc:
  raise ValueError(
      """Donor concentration should be greater than intrinsic concentration""" )
 elif acceptor_conc <= intrinsic_conc:
  raise ValueError(
      """Acceptor concentration should be greater than intrinsic concentration""" )
 else:
  return (
      Boltzmann
      * T
      * log((donor_conc * acceptor_conc) / intrinsic_conc**2 )
      / physical_constants["electron volt"][0]
  )


if __name__ == "__main__":
       import doctest

       doctest.testmod()




"""simple docstring"""

import random


def lowerCAmelCase_      (				UpperCamelCase__	: int				,   UpperCamelCase__	: float				,   UpperCamelCase__	: bool = False ):






 """simple docstring"""







 __lowercase									=	{i: [] for i in range(UpperCamelCase__ )}

 # if probability is greater or equal than 1, then generate a complete graph
 if probability >= 1:
  return complete_graph(UpperCamelCase__ )
 # 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(UpperCamelCase__ ):
  for j in range(i + 1				,   UpperCamelCase__ ):
   if random.random() < probability:
    graph[i].append(UpperCamelCase__ )
    if not directed:
     # if the graph is undirected, add an edge in from j to i, either
     graph[j].append(UpperCamelCase__ )
 return graph


def lowerCAmelCase_      (				UpperCamelCase__	: int ):






 """simple docstring"""







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


if __name__ == "__main__":
       import doctest

       doctest.testmod()
