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
All Methods Instance Methods Abstract 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 givenCollection.
-
-
-
Method Detail
-
sample
java.util.List<T> sample(java.util.Collection<T> set, Battle<T> battle, double selectionProbability)
Create a sample from a givenCollection.- Parameters:
set- the set of elements to be sampled frombattle- lets two elements compete- Returns:
- the sample; may contain
nulls dependent on the implementation
-
-