|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.util.selection.recipes.ElitistSelection<E>
E
- The selection type.public class ElitistSelection<E extends Comparable>
A recipe for Elitist selection.
Elitist selection is performed by:
Constructor Summary | |
---|---|
ElitistSelection()
Create a new instance with a defined comparator being DefaultComparator . |
|
ElitistSelection(Comparator<Selection.Entry<E>> comparator)
Create a new instance with the provided Comparator . |
|
ElitistSelection(ElitistSelection copy)
Create a copy of the provided instance. |
Method Summary | |
---|---|
ElitistSelection |
getClone()
Create a cloned copy of the current object and return it. |
Comparator<Selection.Entry<E>> |
getComparator()
Get the current comparator. |
E |
select(List<? extends E> elements)
Perform the selection process. |
void |
setComparator(Comparator<Selection.Entry<E>> comparator)
Set the comparator to be used. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ElitistSelection()
DefaultComparator
.
public ElitistSelection(Comparator<Selection.Entry<E>> comparator)
Comparator
.
comparator
- The comparator to set.public ElitistSelection(ElitistSelection copy)
copy
- The instance to copy.Method Detail |
---|
public ElitistSelection getClone()
getClone
in interface Cloneable
getClone
in interface SelectionRecipe<E extends Comparable>
Object.clone()
public void setComparator(Comparator<Selection.Entry<E>> comparator)
comparator
- The value to set.public Comparator<Selection.Entry<E>> getComparator()
public E select(List<? extends E> elements)
select
in interface SelectionRecipe<E extends Comparable>
elements
- The elements to perfrom the selection on.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |