freneticlib.core.mutation.abstract_operators¶
Module Contents¶
Classes¶
Abstract parent of all mutation operators. |
|
A container class for the mutation operators. |
- class freneticlib.core.mutation.abstract_operators.AbstractMutationOperator[source]¶
Bases:
abc.ABCAbstract parent of all mutation operators.
- abstract __call__(representation: freneticlib.representations.abstract_representation.RoadRepresentation, test)[source]¶
Returns a new road by altering the original.
- Parameters:
representation (RoadRepresentation) – The road representation used in this search.
test – The road to be mutated (in an acceptable representation).
- Returns:
The mutated road.
- class freneticlib.core.mutation.abstract_operators.AbstractMutator(operators: List[Callable])[source]¶
Bases:
abc.ABCA container class for the mutation operators.
- abstract __call__(representation: freneticlib.representations.abstract_representation.RoadRepresentation, test) List[source]¶
Create a new road by combining road points from two parents.
- Parameters:
representation (RoadRepresentation) – The road representation used in this search.
test – The parent to be mutated.
- Returns:
(List) The mutated tests.