Package org.opt4j.optimizer.ea
Class CouplerDefault
- java.lang.Object
-
- org.opt4j.optimizer.ea.CouplerDefault
-
- All Implemented Interfaces:
Coupler
public class CouplerDefault extends Object implements Coupler
TheCouplerDefaultuses the pairs based on their index in the list:p0+p1,p2+p3,etc..
-
-
Constructor Summary
Constructors Constructor Description CouplerDefault()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<Pair<Individual>>getCouples(int size, List<Individual> parents)Returns a list ofIndividual-groups (couples) that are designated to create offspring.
-
-
-
Method Detail
-
getCouples
public Collection<Pair<Individual>> getCouples(int size, List<Individual> parents)
Description copied from interface:CouplerReturns a list ofIndividual-groups (couples) that are designated to create offspring.- Specified by:
getCouplesin interfaceCoupler- Parameters:
size- the number of couples to createparents- the parents- Returns:
- the selected couples
-
-