|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.util.selection.ordering.ProportionalOrdering<E>
E
- The selection type.public class ProportionalOrdering<E>
Apply a proportionate ordering. Proportionate ordering is done by determining the total maximum weight and then determining the percentage share for each entry.
Constructor Summary | |
---|---|
ProportionalOrdering()
Create a new instance with an internal MersenneTwister . |
|
ProportionalOrdering(Random generator)
Create a new instance with the provided Random . |
Method Summary | |
---|---|
boolean |
order(List<Selection.Entry<E>> elements)
Apply the ordering on the provided list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProportionalOrdering()
MersenneTwister
.
public ProportionalOrdering(Random generator)
Random
.
generator
- The generator to use.Method Detail |
---|
public boolean order(List<Selection.Entry<E>> elements)
This method will apply the proportionate ordering on the provided list of elements.
order
in interface Ordering<E>
elements
- The list to be ordered.
true
if successful, false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |