|
Watchmaker Framework for Evolutionary Computation API (Version 0.7.1) |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.uncommons.watchmaker.framework.operators.ListOperator<T>
T
- The element type of the lists to be mutated.public class ListOperator<T>
A higher-order evolutionary operator that is applied to populations made up of lists. In such populations, each candidate solution is itself a list and this operator is applied to the list contents rather than the candidate. It is analogous to the map function in functional programming languages.
For example, if the evolved population consists of candidates that are lists of strings, we could use a ListOperator to wrap an operator of type String and convert it to an operator that works with lists of Strings.
Constructor Summary | |
---|---|
ListOperator(EvolutionaryOperator<T> delegate)
|
Method Summary | |
---|---|
List<List<T>> |
apply(List<List<T>> selectedCandidates,
Random rng)
Applies the configured operator to each list candidate, operating on the elements that make up a candidate rather than on the list of candidates. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ListOperator(EvolutionaryOperator<T> delegate)
delegate
- The evolutionary operator that will be applied to each
list candidate.Method Detail |
---|
public List<List<T>> apply(List<List<T>> selectedCandidates, Random rng)
apply
in interface EvolutionaryOperator<List<T>>
selectedCandidates
- A list of list candidates.rng
- A source of randomness.
|
Watchmaker Framework for Evolutionary Computation API (Version 0.7.1) |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |