|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--jdsl.core.algo.sorts.ListBubbleSort
| Constructor Summary | |
ListBubbleSort()
|
|
| Method Summary | |
void |
sort(Sequence S,
Comparator c)
Perform a bubble-sort, assuming the sequence is based on a doubly-linked list. First inserts a sentinel to avoid needing to check if we're swapping with the outer loop locator. |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public ListBubbleSort()
| Method Detail |
public void sort(Sequence S,
Comparator c)
First inserts a sentinel to avoid needing to check if we're swapping with the outer loop locator. After that, we can run an analogue of the array-based bubble-sort.
S - c -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||