|
||||||||||
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.RankBasedSelection<E>
E
- public class RankBasedSelection<E extends Comparable>
A recipe for Rank based selection.
Rank based selection is performed by:
Constructor Summary | |
---|---|
RankBasedSelection()
Create a new instance. |
|
RankBasedSelection(Comparator<Selection.Entry<E>> comparator)
Create a new instance with the provided Comparator . |
|
RankBasedSelection(RankBasedSelection copy)
Create a copy of the provided instance. |
Method Summary | |
---|---|
RankBasedSelection |
getClone()
Create a cloned copy of the current object and return it. |
Comparator<Selection.Entry<E>> |
getComparator()
Get the comparator. |
Random |
getRandom()
Get the current random number generator. |
E |
select(List<? extends E> elements)
Perform the selection process. |
void |
setComparator(Comparator<Selection.Entry<E>> comparator)
Set the comparator to use. |
void |
setRandom(Random random)
Set the random number generator to use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RankBasedSelection()
public RankBasedSelection(Comparator<Selection.Entry<E>> comparator)
Comparator
.
comparator
- The comparator to use.public RankBasedSelection(RankBasedSelection copy)
copy
- The instance to copy.Method Detail |
---|
public RankBasedSelection 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 Random getRandom()
public void setRandom(Random random)
random
- The value to set.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 |