Class CouplerDefault

  • All Implemented Interfaces:
    Coupler

    public class CouplerDefault
    extends Object
    implements Coupler
    The CouplerDefault uses the pairs based on their index in the list: p0+p1,p2+p3,etc..
    • Constructor Detail

      • CouplerDefault

        public CouplerDefault()
    • Method Detail

      • getCouples

        public Collection<Pair<Individual>> getCouples​(int size,
                                                       List<Individual> parents)
        Description copied from interface: Coupler
        Returns a list of Individual-groups (couples) that are designated to create offspring.
        Specified by:
        getCouples in interface Coupler
        Parameters:
        size - the number of couples to create
        parents - the parents
        Returns:
        the selected couples