onegpy.operators.crossover.crossover

onegpy.operators.crossover.crossover(parents, points, destructive=False)[source]

Core function for crossover :param parents: list of solution objects. solutions to do crossover. :param points: list of node. crossover points. these nodes are replaced each other. :param destructive: bool. If true, solution is replaced, keeping its object. Otherwise, new solution instance is created, protecting original solution. :return: list of solution objects. new_solutions