parameters: (self, original1, original2)
return_statement: return child1, child2
docstring: This function computes single-point crossover on two parents and returns two children.
docstring_summary: This function computes single-point crossover on two parents and returns two children.
docstring_tokens: This function computes single - point crossover on two parents and returns two children .
function: def single_crossover(self, original1, original2):
          """ This function computes single-point crossover on two parents and returns two children.
  """
          point=self.r.uniform(0.1,0.6)
          cut1=int(point*len(original1))
          cut2=int(point*len(original2))
          child1=original1[:cut1]+original2[cut2:]
          child2=original2[:cut2]+original1[cut1:]
          return child1, child2
function_tokens: def single_crossover ( self , original1 , original2 ) : point = self . r . uniform ( 0.1 , 0.6 ) cut1 = int ( point * len ( original1 ) ) cut2 = int ( point * len ( original2 ) ) child1 = original1 [ : cut1 ] + original2 [ cut2 : ] child2 = original2 [ : cut2 ] + original1 [ cut1 : ] return child1 , child2