def initial_simplex(self):
    cfg0 = self.initial_simplex_seed()
    simplex = [cfg0]
    params = self.manipulator.parameters(cfg0)
    params = list(filter(lambda x: x.is_primitive(), params))
    if len(params) == 0:
      return simplex

    q = (((1.0 - math.sqrt(len(params) + 1.0)) / (len(params) * math.sqrt(2.0)))
         * self.initial_unit_edge_length)
    p = q + ((1.0 / math.sqrt(2.0)) * self.initial_unit_edge_length)

    base = [x.get_unit_value(cfg0) for x in params]
    for j in xrange(len(base)):
      if max(p, q) + base[j] > 1.0:
        #flip this dimension as we would overflow our [0,1] bounds
        base[j] *= -1.0

    for i in xrange(len(params)):
      simplex.append(self.manipulator.copy(cfg0))
      params[i].set_unit_value(simplex[-1], abs(base[i] + p))
      for j in xrange(i + 1, len(params)):
        params[j].set_unit_value(simplex[-1], abs(base[i] + q))

    return simplex
dataset/ETHPy150Open jansel/opentuner/opentuner/search/simplextechniques.py/RegularInitialMixin.initial_simplex/swapped operands of `-`