Package org.opt4j.operator.diversity
Class DiversityGenericImplementation
- java.lang.Object
-
- org.opt4j.operator.AbstractGenericOperator<Diversity<Genotype>,Diversity<?>>
-
- org.opt4j.operator.diversity.DiversityGenericImplementation
-
- All Implemented Interfaces:
Operator<Genotype>,Diversity<Genotype>,GenericOperator<Diversity<Genotype>>
public class DiversityGenericImplementation extends AbstractGenericOperator<Diversity<Genotype>,Diversity<?>> implements Diversity<Genotype>
TheDiversityGenericImplementationis a standard implementation of theDiversityinterface.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opt4j.operator.AbstractGenericOperator
AbstractGenericOperator.ClassComparator, AbstractGenericOperator.OperatorClassPredicate, AbstractGenericOperator.OperatorHolder<P>, AbstractGenericOperator.OperatorPredicate, AbstractGenericOperator.OperatorVoidPredicate
-
-
Field Summary
-
Fields inherited from class org.opt4j.operator.AbstractGenericOperator
classOperators, cldef, genericOperators
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDiversityGenericImplementation()Constructs theDiversityGenericImplementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublediversity(Genotype a, Genotype b)Returns the genetic diversity of twoGenotypes.protected doublediversityComposite(CompositeGenotype<?,?> a, CompositeGenotype<?,?> b)-
Methods inherited from class org.opt4j.operator.AbstractGenericOperator
addOperator, getOperator, getOperators, getTarget, inject
-
-
-
-
Constructor Detail
-
DiversityGenericImplementation
@Inject protected DiversityGenericImplementation()
Constructs theDiversityGenericImplementation.
-
-
Method Detail
-
diversity
public double diversity(Genotype a, Genotype b)
Description copied from interface:DiversityReturns the genetic diversity of twoGenotypes.
-
diversityComposite
protected double diversityComposite(CompositeGenotype<?,?> a, CompositeGenotype<?,?> b)
-
-