Class PermutationVectorRepresentation
java.lang.Object
com.knezevic.edaf.v3.repr.impl.PermutationVectorRepresentation
- All Implemented Interfaces:
Representation<PermutationVector>
public final class PermutationVectorRepresentation
extends Object
implements Representation<PermutationVector>
Permutation representation built with in-place Fisher-Yates shuffle.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisValid(PermutationVector genotype) Returns true if the genotype is valid in this domain.Creates a random feasible genotype.repair(PermutationVector genotype) Repairs a genotype into the feasible domain.summarize(PermutationVector genotype) Provides a stable summary for logs and reports.type()Representation identifier used in configuration and logs.
-
Constructor Details
-
PermutationVectorRepresentation
public PermutationVectorRepresentation(int size)
-
-
Method Details
-
type
Description copied from interface:RepresentationRepresentation identifier used in configuration and logs.- Specified by:
typein interfaceRepresentation<PermutationVector>
-
random
Description copied from interface:RepresentationCreates a random feasible genotype.- Specified by:
randomin interfaceRepresentation<PermutationVector>
-
isValid
Description copied from interface:RepresentationReturns true if the genotype is valid in this domain.- Specified by:
isValidin interfaceRepresentation<PermutationVector>
-
repair
Description copied from interface:RepresentationRepairs a genotype into the feasible domain.- Specified by:
repairin interfaceRepresentation<PermutationVector>
-
summarize
Description copied from interface:RepresentationProvides a stable summary for logs and reports.- Specified by:
summarizein interfaceRepresentation<PermutationVector>
-