Crossover.py 412 B

123456789101112131415161718
  1. """Abstract Crossover class
  2. """
  3. # module imports
  4. from ..Operator import KindOperator, Operator
  5. # main mutation class
  6. class Crossover(Operator):
  7. """Abstract crossover extend from Operator
  8. Attributes:
  9. kind: {KindOperator} -- specify the kind of operator
  10. """
  11. def __init__(self):
  12. self.kind = KindOperator.CROSSOVER
  13. def apply(self, solution):
  14. raise NotImplementedError