Interface Sampler<T>

Type Parameters:
T - the type of sampled elements
All Known Implementing Classes:
ReservoirSampler, TournamentSampler

public interface Sampler<T>
Interface that describes a sampling algorithm that can give bias towards certain elements..
  • Method Summary

    Modifier and Type
    Method
    Description
    sample(Collection<T> set, Battle<T> battle, double selectionProbability)
    Create a sample from a given Collection.
  • Method Details

    • sample

      List<T> sample(Collection<T> set, Battle<T> battle, double selectionProbability)
      Create a sample from a given Collection.
      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