Class MixedDiscreteVectorRepresentation
java.lang.Object
com.knezevic.edaf.v3.repr.impl.MixedDiscreteVectorRepresentation
- All Implemented Interfaces:
Representation<MixedDiscreteVector>
public final class MixedDiscreteVectorRepresentation
extends Object
implements Representation<MixedDiscreteVector>
Mixed discrete representation modeled as integer-coded attributes with cardinalities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisValid(MixedDiscreteVector genotype) Returns true if the genotype is valid in this domain.Creates a random feasible genotype.repair(MixedDiscreteVector genotype) Repairs a genotype into the feasible domain.summarize(MixedDiscreteVector genotype) Provides a stable summary for logs and reports.type()Representation identifier used in configuration and logs.
-
Constructor Details
-
MixedDiscreteVectorRepresentation
public MixedDiscreteVectorRepresentation(int[] cardinalities)
-
-
Method Details
-
type
Description copied from interface:RepresentationRepresentation identifier used in configuration and logs.- Specified by:
typein interfaceRepresentation<MixedDiscreteVector>
-
random
Description copied from interface:RepresentationCreates a random feasible genotype.- Specified by:
randomin interfaceRepresentation<MixedDiscreteVector>
-
isValid
Description copied from interface:RepresentationReturns true if the genotype is valid in this domain.- Specified by:
isValidin interfaceRepresentation<MixedDiscreteVector>
-
repair
Description copied from interface:RepresentationRepairs a genotype into the feasible domain.- Specified by:
repairin interfaceRepresentation<MixedDiscreteVector>
-
summarize
Description copied from interface:RepresentationProvides a stable summary for logs and reports.- Specified by:
summarizein interfaceRepresentation<MixedDiscreteVector>
-