|
||||||||||
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.RandomOrdering<E>
E
- The comparable type.public class RandomOrdering<E>
Apply a random ordering to the provided list. This class defines that the list instance will have it's internal order randomly shuffled.
Constructor Summary | |
---|---|
RandomOrdering()
Create a new instance. |
|
RandomOrdering(Random generator)
Create an instance with the provided Random as the generator
class to use. |
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 RandomOrdering()
MersenneTwister
will be set as the
predefined generator instance.
public RandomOrdering(Random generator)
Random
as the generator
class to use.
generator
- The random to use.Method Detail |
---|
public boolean order(List<Selection.Entry<E>> 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 |