T
- The component type of the lists created by this factory.public class ListPermutationFactory<T> extends AbstractCandidateFactory<java.util.List<T>>
Constructor and Description |
---|
ListPermutationFactory(java.util.List<T> elements)
Creates a factory that creates lists that contain each of the specified
elements exactly once.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<T> |
generateRandomCandidate(java.util.Random rng)
Generates a random permutation from the configured elements.
|
generateInitialPopulation, generateInitialPopulation
public ListPermutationFactory(java.util.List<T> elements)
elements
- The elements to permute.public java.util.List<T> generateRandomCandidate(java.util.Random rng)
rng
- A source of randomness used to generate the random
permutation.