|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--de.bianet.Sort
universelle Sortierklasse. Sortierung von Elementen entweder nach dem Quicksort oder dem Bubblesort Algorithmus.
| Field Summary | |
private int |
AnzVergleiche
|
private java.lang.Comparable[] |
ausgabe
|
static int |
BUBBLESORT
|
(package private) static org.apache.log4j.Logger |
logger
|
static int |
QUICKSORT
|
int[] |
SortVektor
|
| Constructor Summary | |
Sort()
|
|
| Method Summary | |
private void |
bubblesort(int ende)
Der Bubblesort-Algorithmus. |
private void |
quicksort(int start,
int ende)
Der Quicksort-Algorithmus. |
int[] |
sort(java.lang.Comparable[][] input,
int spalte)
Sortiert eine Matrix mit 2 Spalten |
java.lang.Object[] |
sort(java.lang.Comparable[] input,
int algorithmus)
|
private void |
tausche(int i,
int j)
Tauschen von 2 Werten. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int QUICKSORT
public static final int BUBBLESORT
private java.lang.Comparable[] ausgabe
private int AnzVergleiche
public int[] SortVektor
static org.apache.log4j.Logger logger
| Constructor Detail |
public Sort()
| Method Detail |
public java.lang.Object[] sort(java.lang.Comparable[] input,
int algorithmus)
public int[] sort(java.lang.Comparable[][] input,
int spalte)
spalte - gibt an, ob nach Spalte 1 oder 2 sortiert werden soll
private void quicksort(int start,
int ende)
start - startindexende - endindexprivate void bubblesort(int ende)
ende - obere Grenze des zu sortierenden Bereichs
private void tausche(int i,
int j)
i - tausche augabe[i] mit ausgabe[j]j - tausche augabe[j] mit ausgabe[i]
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||