|
||||||||||
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.RingBasedOrdering<E>
E
- The selection type.public class RingBasedOrdering<E>
Arrange all elements as a ring and depending on the desired pivot point, return an ordering that defines the list of elements that follow on from the pivot.
Constructor Summary | |
---|---|
RingBasedOrdering()
Create a new instance. |
|
RingBasedOrdering(E marker)
Create a new instance with the provided marker as the pivot point. |
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 RingBasedOrdering()
null
.
public RingBasedOrdering(E marker)
marker
as the pivot point.
marker
- The pivot point to use.Method Detail |
---|
public boolean order(List<Selection.Entry<E>> elements)
The application of this ordering will result in "next in line" ordering, based
on the currently provided marker
.
Example:
If the set of integers, {1, 2, 3, 4, 5, 6, 7, 8, 9}, is ordered with the marker
element defined to be 5, the resulting order will be: {6, 7, 8, 9, 1, 2, 3, 4, 5}
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 |