parameters: (self, n_points, probability)
docstring: Changes 0 => 1 and 1 => 0.
docstring_summary: Changes 0 => 1 and 1 => 0.
docstring_tokens: Changes 0 = > 1 and 1 = > 0 .
function: def mutation_binary_point(self, n_points, probability):
          """Changes 0 => 1 and 1 => 0.
          """
          mutant = ""
          for _ in range(n_points):
              self.fitness = None
              pos = self.rand.randint(1, len(self.binary) - 1)
              p_m = self.rand.rand()
              if p_m < probability:
                  if self.binary[pos] == "0":
                      mutant = self.binary[:pos] + "1" + self.binary[pos + 1:]
                  else:
                      mutant = self.binary[:pos] + "0" + self.binary[pos + 1:]
              else:
                  mutant = self.binary
          self.binary = mutant
function_tokens: def mutation_binary_point ( self , n_points , probability ) : mutant = "" for _ in range ( n_points ) : self . fitness = None pos = self . rand . randint ( 1 , len ( self . binary ) - 1 ) p_m = self . rand . rand ( ) if p_m < probability : if self . binary [ pos ] == "0" : mutant = self . binary [ : pos ] + "1" + self . binary [ pos + 1 : ] else : mutant = self . binary [ : pos ] + "0" + self . binary [ pos + 1 : ] else : mutant = self . binary self . binary = mutant