Class HUX
java.lang.Object
org.moeaframework.core.operator.TypeSafeCrossover<BinaryVariable>
org.moeaframework.core.operator.binary.HUX
- All Implemented Interfaces:
Configurable,Named,Variation
Half-uniform crossover (HUX) operator. Half of the non-matching bits are swapped between the two parents.
This variation operator is type-safe.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidevolve(BinaryVariable v1, BinaryVariable v2) Evolves the specified variables using the HUX operator.getName()Returns the name of this variation operator.Methods inherited from class org.moeaframework.core.operator.TypeSafeCrossover
evolve, getArity, getProbability, setProbabilityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.moeaframework.core.configuration.Configurable
applyConfiguration, getConfiguration
-
Constructor Details
-
HUX
public HUX()Constructs a HUX operator with a 100% chance of applying this operator to each solution. -
HUX
public HUX(double probability) Constructs a HUX operator.- Parameters:
probability- the probability of applying this operator to each solution
-
-
Method Details
-
getName
Description copied from interface:VariationReturns the name of this variation operator. This name should also be used as the prefix for any parameters. As such, the name should only contain alphanumeric characters, avoid using whitespace and other symbols.- Returns:
- the name of this variation operator
-
evolve
Evolves the specified variables using the HUX operator.- Specified by:
evolvein classTypeSafeCrossover<BinaryVariable>- Parameters:
v1- the first variablev2- the second variable- Throws:
TypeMismatchException- if the variables have different lengths
-