Class TournamentSampler<T>

java.lang.Object
org.apache.wayang.profiler.log.sampling.TournamentSampler<T>
All Implemented Interfaces:
Sampler<T>

public class TournamentSampler<T> extends Object implements Sampler<T>
Sampling strategy that simulates a tournament between elements.
  • Constructor Details

    • TournamentSampler

      public TournamentSampler()
  • Method Details

    • sample

      public List<T> sample(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