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>
TheDiversityGenericImplementation
is a standard implementation of theDiversity
interface.
-
-
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 protected
DiversityGenericImplementation()
Constructs theDiversityGenericImplementation
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
diversity(Genotype a, Genotype b)
Returns the genetic diversity of twoGenotype
s.protected double
diversityComposite(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:Diversity
Returns the genetic diversity of twoGenotype
s.
-
diversityComposite
protected double diversityComposite(CompositeGenotype<?,?> a, CompositeGenotype<?,?> b)
-
-