Package org.opt4j.optimizer.ea
Class CouplerDefault
java.lang.Object
org.opt4j.optimizer.ea.CouplerDefault
- All Implemented Interfaces:
Coupler
The
CouplerDefault
uses the pairs based on their index in the list:
p0+p1,p2+p3,etc.
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCouples
(int size, List<Individual> parents) Returns a list ofIndividual
-groups (couples) that are designated to create offspring.
-
Constructor Details
-
CouplerDefault
public CouplerDefault()
-
-
Method Details
-
getCouples
Description copied from interface:Coupler
Returns a list ofIndividual
-groups (couples) that are designated to create offspring.- Specified by:
getCouples
in interfaceCoupler
- Parameters:
size
- the number of couples to createparents
- the parents- Returns:
- the selected couples
-