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 TypeMethodDescriptionsample(Collection<T> set, Battle<T> battle, double selectionProbability) Create a sample from a givenCollection.
-
Method Details
-
sample
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
-