Class TournamentSampler<T>

  • All Implemented Interfaces:
    Sampler<T>

    public class TournamentSampler<T>
    extends java.lang.Object
    implements Sampler<T>
    Sampling strategy that simulates a tournament between elements.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<T> sample​(java.util.Collection<T> set, Battle<T> battle, double selectionProbability)
      Create a sample from a given Collection.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TournamentSampler

        public TournamentSampler()
    • Method Detail

      • sample

        public java.util.List<T> sample​(java.util.Collection<T> set,
                                        Battle<T> battle,
                                        double selectionProbability)
        Description copied from interface: Sampler
        Create a sample from a given Collection.
        Specified by:
        sample in interface Sampler<T>
        Parameters:
        set - the set of elements to be sampled from
        battle - lets two elements compete
        Returns:
        the sample; may contain nulls dependent on the implementation