|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gishur.core.Sorter
This class implements several sorting-algorithms. To compare the objects
which shall be sort, a Comparitor
is used. If no Comparitor
is set, a StdComparitor
will be used.
To sort a set of elements, procede like the following:
Sorter
-object and definition of a
Comparitor
defining an order on this set.Comparitor
can be set for an existing Sorter
using
setComparitor(Comparitor c)
.
setAscendingOrder()
and setDescendingOrder()
.
Sorter
with add
.
add
accepts SimpleLists
, Object
-arrays,
intervals from array and single objects. Additionally, any primitive data type
(int, double, etc.) and any array of them is allowed as argument for add
.
sort()
or by one of the implemented special sorting-algorithms: BubbleSort()
QuickSort()
and HeapSort()
. sort()
calls
BubbleSort()
for small amounts of data, otherwise the worst-case-efficient
HeapSort()
.
get
-method.
getSimpleList()
returns a SimpleList
, getArray()
an array of objects,
getIntArray()
an array of int
-values, etc. Sorter S=new Sorter(); int[] array=new int[5000]; ... // code filling 'array' with ints... int[] sortedArray=S.HeapSort(array,15,1500); // sorts the interval from array[15] to array[1500] with HeapSort() // and stores the sorted data in 'sortedArray'ATTENTION! A
Sorter
-object is no structure to store objects. As few
add(java.lang.Object)
-methods as possible should be called in a sorting-process,
preferably only one.
Comparitor
,
StdComparitor
Field Summary | |
protected Comparitor |
_comparitor
The set Comparitor . |
static byte |
ASCENDING
A constant for sorting in ascending order. |
static byte |
DESCENDING
A constant for sorting in descending order. |
Constructor Summary | |
Sorter()
Standard constructor. |
|
Sorter(Comparitor c)
Constructor setting a Comparitor or creating a new StdComparitor ,
if c==null . |
Method Summary | |
void |
add(BasicList L)
Adds the contents of a list ( SimpleList , Queue , Stack ) to the Sorter . |
void |
add(boolean b)
Adds a boolean -value b to _data . |
void |
add(boolean[] o)
Sets the array of data to be sorted directly to the boolean -array o . |
void |
add(boolean[] o,
int l,
int r)
Sets the array of data to be sorted directly to the boolean -array o . |
void |
add(char c)
Adds a char -value c to _data . |
void |
add(char[] o)
Sets the array of data to be sorted directly to the char -array o . |
void |
add(char[] o,
int l,
int r)
Sets the array of data to be sorted directly to the char -array o . |
void |
add(double d)
Adds a double -value d to _data . |
void |
add(double[] o)
Sets the array of data to be sorted directly to the double -array o . |
void |
add(double[] o,
int l,
int r)
Sets the array of data to be sorted directly to the double -array o . |
void |
add(java.util.Enumeration enum)
Adds the contents of the java.util.Enumeration -object enum
to the Sorter . |
void |
add(float f)
Adds a float -value f to _data . |
void |
add(float[] o)
Sets the array of data to be sorted directly to the float -array o . |
void |
add(float[] o,
int l,
int r)
Sets the array of data to be sorted directly to the float -array o . |
void |
add(int i)
Adds an int -value i to _data . |
void |
add(int[] o)
Sets the array of data to be sorted directly to the int -array o . |
void |
add(int[] o,
int l,
int r)
Sets the array of data to be sorted directly to the int -array o . |
void |
add(long l)
Adds a long -value l to _data . |
void |
add(long[] o)
Sets the array of data to be sorted directly to the long -array o . |
void |
add(long[] o,
int l,
int r)
Sets the array of data to be sorted directly to the long -array o . |
void |
add(java.lang.Object o)
Adds an object o to _data . |
void |
add(java.lang.Object[] o)
Sets the array of data to be sorted directly to the Object -array o . |
void |
add(java.lang.Object[] o,
int l,
int r)
Adds an interval of array o to _data . |
int |
BinSearch(int l,
int r,
java.lang.Object o)
Works the same way like BinSearch(Object[],int,int,Object) , except that the search
takes place in the sorted data array of this Sorter . |
int |
BinSearch(java.lang.Object o)
Works like BinSearch(int,int,Object) , but without interval bounds the whole data array will
be searched. |
int |
BinSearch(java.lang.Object[] array,
int l,
int r,
java.lang.Object o)
Binary search for Object o in interval from 1 to r of the sorted
array array . |
void |
BubbleSort()
Bubble-Sort. |
List |
BubbleSort(BasicList L)
BubbleSort() performed on a BasicList . |
char[] |
BubbleSort(char[] o)
BubbleSort() directly called with an array of char s. |
char[] |
BubbleSort(char[] o,
int l,
int r)
BubbleSort() directly called with an array of char s and an interval bounds
specification. |
double[] |
BubbleSort(double[] o)
BubbleSort() directly called with an array of double s. |
double[] |
BubbleSort(double[] o,
int l,
int r)
BubbleSort() directly called with an array of double s and an interval bounds
specification. |
java.util.Enumeration |
BubbleSort(java.util.Enumeration enum)
BubbleSort() performed on an Enumeration . |
float[] |
BubbleSort(float[] o)
BubbleSort() directly called with an array of float s. |
float[] |
BubbleSort(float[] o,
int l,
int r)
BubbleSort() directly called with an array of float s and an interval bounds
specification. |
int[] |
BubbleSort(int[] o)
BubbleSort() directly called with an array of int s. |
int[] |
BubbleSort(int[] o,
int l,
int r)
BubbleSort() directly called with an array of int s and an interval bounds
specification. |
long[] |
BubbleSort(long[] o)
BubbleSort() directly called with an array of long s. |
long[] |
BubbleSort(long[] o,
int l,
int r)
BubbleSort() directly called with an array of long s and an interval bounds
specification. |
java.lang.Object[] |
BubbleSort(java.lang.Object[] o)
BubbleSort() directly called with an array of Object s. |
java.lang.Object[] |
BubbleSort(java.lang.Object[] o,
int l,
int r)
BubbleSort() directly called with an array of Object s and an interval bounds
specification. |
void |
clear()
Removes all stored data from the Sorter . |
java.lang.Object[] |
getArray()
Returns the sorted data as an array of Object s. |
boolean[] |
getBooleanArray()
Returns an array containing all elements of _data which are instances
of java.lang.Boolean converted into boolean in sorted order. |
char[] |
getCharArray()
Returns an array containing all elements of _data which are instances
of java.lang.Character converted into char in sorted order. |
Comparitor |
getComparitor()
Returns the actually set Comparitor for this Sorter . |
double[] |
getDoubleArray()
Returns an array containing all elements of _data which are instances
of java.lang.Number converted into double in sorted order. |
java.util.Enumeration |
getEnumeration()
Returns a java.util.Enumeration -object enumerating the sorted data. |
float[] |
getFloatArray()
Returns an array containing all elements of _data which are instances
of java.lang.Number converted into float in sorted order. |
int[] |
getIntArray()
Returns an array containing all elements of _data which are instances
of java.lang.Number converted into int in sorted order. |
List |
getList()
Returns the sorted data in a List . |
long[] |
getLongArray()
Returns an array containing all elements of _data which are instances
of java.lang.Number converted into long in sorted order. |
List |
getQueue()
Returns the sorted data in a Queue . |
SimpleList |
getSimpleList()
Returns the sorted data in a SimpleList . |
List |
getStack()
Returns the sorted data in a Stack . |
protected java.lang.Object[] |
getUnsortedArray()
Returns the unsorted array of data. |
void |
HeapSort()
The Heapsort-algorithm. |
List |
HeapSort(BasicList L)
HeapSort() performed on a BasicList . |
char[] |
HeapSort(char[] o)
HeapSort() directly called with an array of char s. |
char[] |
HeapSort(char[] o,
int l,
int r)
HeapSort() directly called with an array of char s and an interval bounds
specification. |
double[] |
HeapSort(double[] o)
HeapSort() directly called with an array of double s. |
double[] |
HeapSort(double[] o,
int l,
int r)
HeapSort() directly called with an array of double s
and an interval bounds specification. |
java.util.Enumeration |
HeapSort(java.util.Enumeration enum)
HeapSort() performed on an Enumeration . |
float[] |
HeapSort(float[] o)
HeapSort() directly called with an array of float s. |
float[] |
HeapSort(float[] o,
int l,
int r)
HeapSort() directly called with an array of float s and an interval bounds
specification. |
int[] |
HeapSort(int[] o)
HeapSort() directly called with an array of int s. |
int[] |
HeapSort(int[] o,
int l,
int r)
HeapSort() directly called with an array of int s and an interval bounds
specification. |
long[] |
HeapSort(long[] o)
HeapSort() directly called with an array of long s. |
long[] |
HeapSort(long[] o,
int l,
int r)
HeapSort() directly called with an array of long s and an interval bounds
specification. |
java.lang.Object[] |
HeapSort(java.lang.Object[] o)
HeapSort() directly called with an array of Object s. |
java.lang.Object[] |
HeapSort(java.lang.Object[] o,
int l,
int r)
HeapSort() directly called with an array of Object s and an interval bounds
specification. |
boolean |
isSorted()
Returns true if sorting has taken place already. |
int |
length()
Returns the number of objects which are stored for sorting at the moment. |
void |
QuickSort()
The Quicksort-algorithm. |
List |
QuickSort(BasicList L)
QuickSort() performed on a BasicList . |
char[] |
QuickSort(char[] o)
QuickSort() directly called with an array of char s. |
char[] |
QuickSort(char[] o,
int l,
int r)
QuickSort() directly called with an array of char s
and an interval bounds specification. |
double[] |
QuickSort(double[] o)
QuickSort() directly called with an array of double s. |
double[] |
QuickSort(double[] o,
int l,
int r)
QuickSort() directly called with an array of double s
and an interval bounds specification. |
java.util.Enumeration |
QuickSort(java.util.Enumeration enum)
QuickSort() performed on an Enumeration . |
float[] |
QuickSort(float[] o)
QuickSort() directly called with an array of float s. |
float[] |
QuickSort(float[] o,
int l,
int r)
QuickSort() directly called with an array of float s
and an interval bounds specification. |
int[] |
QuickSort(int[] o)
QuickSort() directly called with an array of int s. |
int[] |
QuickSort(int[] o,
int l,
int r)
QuickSort() directly called with an array of int s
and an interval bounds specification. |
long[] |
QuickSort(long[] o)
QuickSort() directly called with an array of long s. |
long[] |
QuickSort(long[] o,
int l,
int r)
QuickSort() directly called with an array of long s
and an interval bounds specification. |
java.lang.Object[] |
QuickSort(java.lang.Object[] o)
QuickSort() directly called with an array of Object s. |
java.lang.Object[] |
QuickSort(java.lang.Object[] o,
int l,
int r)
QuickSort() directly called with an array of Object s and an interval bounds
specification. |
protected void |
setArray(java.lang.Object[] array)
Sets the array containing the data to sort directly to array ! |
void |
setAscendingOrder()
Commands the Sorter to sort the data in ascending order in the next sorting-process. |
void |
setComparitor(Comparitor c)
Sets the Comparitor . |
void |
setDescendingOrder()
Commands the Sorter to sort the data in descending order in the next sorting-process. |
void |
sort()
The standard sorting method. |
List |
sort(BasicList L)
sort() performed on a BasicList . |
char[] |
sort(char[] o)
sort() directly called with an array of char s. |
char[] |
sort(char[] o,
int l,
int r)
sort() directly called with an array of char s
and an interval bounds specification. |
double[] |
sort(double[] o)
sort() directly called with an array of double s. |
double[] |
sort(double[] o,
int l,
int r)
sort() directly called with an array of double s
and an interval bounds specification. |
java.util.Enumeration |
sort(java.util.Enumeration enum)
sort() performed on an Enumeration . |
float[] |
sort(float[] o)
sort() directly called with an array of float s. |
float[] |
sort(float[] o,
int l,
int r)
sort() directly called with an array of float s
and an interval bounds specification. |
int[] |
sort(int[] o)
sort() directly called with an array of int s. |
int[] |
sort(int[] o,
int l,
int r)
sort() directly called with an array of int s
and an interval bounds specification. |
long[] |
sort(long[] o)
sort() directly called with an array of long s. |
long[] |
sort(long[] o,
int l,
int r)
sort() directly called with an array of long s
and an interval bounds specification. |
java.lang.Object[] |
sort(java.lang.Object[] o)
sort() directly called with an array of Object s. |
java.lang.Object[] |
sort(java.lang.Object[] o,
int l,
int r)
sort() directly called with an array of Object s and an interval bounds
specification. |
void |
storeInList(BasicList L)
Stores the content of this Sorter -object (sorted or not) int BasicList L .
|
java.lang.String |
toString()
Overrides java.lang.Object.toString() . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Comparitor _comparitor
Comparitor
.public static final byte ASCENDING
public static final byte DESCENDING
Constructor Detail |
public Sorter(Comparitor c)
Comparitor
or creating a new StdComparitor
,
if c==null
.c
- Comparitor
to compare the objects in this Sorter
public Sorter()
Method Detail |
public java.lang.String toString()
java.lang.Object.toString()
.toString
in class java.lang.Object
Object.toString()
public void clear()
Sorter
.public void setComparitor(Comparitor c)
Comparitor
.c
- new Comparitor
-objectpublic Comparitor getComparitor()
Comparitor
for this Sorter
.Sorter's
Comparitor
-objectpublic void setAscendingOrder()
Sorter
to sort the data in ascending order in the next sorting-process.public void setDescendingOrder()
Sorter
to sort the data in descending order in the next sorting-process.public int length()
public boolean isSorted()
true
if sorting has taken place already.true
, if _data
has been sorted alreadyprotected void setArray(java.lang.Object[] array)
array
!array
- an array of objectspublic void add(java.lang.Object o)
o
to _data
.public void add(int i)
int
-value i
to _data
.public void add(long l)
long
-value l
to _data
.public void add(float f)
float
-value f
to _data
.public void add(double d)
double
-value d
to _data
.public void add(char c)
char
-value c
to _data
.public void add(boolean b)
boolean
-value b
to _data
.public void add(java.lang.Object[] o, int l, int r)
o
to _data
.o
- an array of type Object
l
- lower interval boundr
- upper interval boundpublic void add(java.lang.Object[] o)
Object
-array o
.o
- an array of type Object
public void add(int[] o, int l, int r)
int
-array o
.o
- an array of type int
l
- lower interval boundr
- upper interval boundpublic void add(int[] o)
int
-array o
.o
- an array of type Object
public void add(long[] o, int l, int r)
long
-array o
.o
- an array of type long
l
- lower interval boundr
- upper interval boundpublic void add(long[] o)
long
-array o
.o
- an array of type long
public void add(float[] o, int l, int r)
float
-array o
.o
- an array of type float
l
- lower interval boundr
- upper interval boundpublic void add(float[] o)
float
-array o
.o
- an array of type float
public void add(double[] o, int l, int r)
double
-array o
.o
- an array of type double
l
- lower interval boundr
- upper interval boundpublic void add(double[] o)
double
-array o
.o
- an array of type double
public void add(char[] o, int l, int r)
char
-array o
.o
- an array of type char
l
- lower interval boundr
- upper interval boundpublic void add(char[] o)
char
-array o
.o
- an array of type char
public void add(boolean[] o, int l, int r)
boolean
-array o
.o
- an array of type boolean
l
- lower interval boundr
- upper interval boundpublic void add(boolean[] o)
boolean
-array o
.o
- an array of type boolean
public void add(BasicList L)
SimpleList
, Queue
, Stack
) to the Sorter
.L
- an object of type BasicList
public void add(java.util.Enumeration enum)
java.util.Enumeration
-object enum
to the Sorter
.enum
- an object of type java.util.Enumeration
public java.lang.Object[] getArray()
Object
s.Object
containing the sorted dataprotected java.lang.Object[] getUnsortedArray()
_data
.Sorter's
datapublic int[] getIntArray()
_data
which are instances
of java.lang.Number
converted into int
in sorted order.java.lang.Number
s converted into int
-values and sorted in an arraypublic long[] getLongArray()
_data
which are instances
of java.lang.Number
converted into long
in sorted order.java.lang.Number
s converted into long
-values and sorted in an arraypublic float[] getFloatArray()
_data
which are instances
of java.lang.Number
converted into float
in sorted order.java.lang.Number
s converted into float
-values and sorted in an arraypublic double[] getDoubleArray()
_data
which are instances
of java.lang.Number
converted into double
in sorted order.java.lang.Number
s converted into double
-values and sorted in an arraypublic boolean[] getBooleanArray()
_data
which are instances
of java.lang.Boolean
converted into boolean
in sorted order.java.lang.Boolean
s converted into boolean
-values and sorted in an arraypublic char[] getCharArray()
_data
which are instances
of java.lang.Character
converted into char
in sorted order.java.lang.Character
s converted into char
-values and sorted in an arraypublic void storeInList(BasicList L)
Sorter
-object (sorted or not) int BasicList
L
.
If forward==true
, the data will be appended to the end of the list, otherwise to the
beginning.L
- BasicList
-object, in which to store this Sorter's
dataforward
- direction in which to append the data to the listpublic SimpleList getSimpleList()
SimpleList
.SimpleList
containing sorted datapublic List getList()
List
.List
containing sorted datapublic List getQueue()
Queue
.Queue
containing sorted datapublic List getStack()
Stack
.Stack
containing sorted datapublic java.util.Enumeration getEnumeration()
java.util.Enumeration
-object enumerating the sorted data.Enumeration
for the sorted datapublic void sort()
_data
contains less than ten elements, BubbleSort()
will be performed, otherwise HeapSort()
.public void BubbleSort()
public void HeapSort()
public void QuickSort()
public int BinSearch(java.lang.Object[] array, int l, int r, java.lang.Object o)
Object o
in interval from 1 to r of the sorted
array array
.array
- sorted array to search inl
- lower search interval boundr
- upper search interval boundo
- Object
to search foro
in array
, or -1, if o
was not found in array
BinSearch(int,int,Object)
,
BinSearch(Object)
public int BinSearch(int l, int r, java.lang.Object o)
BinSearch(Object[],int,int,Object)
, except that the search
takes place in the sorted data array of this Sorter
. If the Sorter's
data array is
not already sorted, sort()
will be called.l
- lower search interval boundr
- upper search interval boundo
- Object
to search foro
in _data
, or -1, if o
was not found in this Sorter
BinSearch(Object[],int,int,Object)
,
BinSearch(Object)
public int BinSearch(java.lang.Object o)
BinSearch(int,int,Object)
, but without interval bounds the whole data array will
be searched.o
- Object
to search foro
in _data
, or -1, if o
was not found in this Sorter
BinSearch(int,int,Object)
,
BinSearch(Object[],int,int,Object)
public java.lang.Object[] BubbleSort(java.lang.Object[] o)
BubbleSort()
directly called with an array of Object
s.o
- an array of type Object
containing the data to sort.BubbleSort()
public java.lang.Object[] BubbleSort(java.lang.Object[] o, int l, int r)
BubbleSort()
directly called with an array of Object
s and an interval bounds
specification.o
- an array of type Object
containing the data to sort.l
- lower interval boundr
- upper interval boundObject
containing the sorted elements of the interval o[l]
to o[r]
BubbleSort()
public int[] BubbleSort(int[] o)
BubbleSort()
directly called with an array of int
s.o
- an array of type int
containing the data to sort.BubbleSort()
public int[] BubbleSort(int[] o, int l, int r)
BubbleSort()
directly called with an array of int
s and an interval bounds
specification.o
- an array of type int
containing the data to sort.l
- lower interval boundr
- upper interval boundint
containing the sorted elements of the interval o[l]
to o[r]
BubbleSort()
public long[] BubbleSort(long[] o)
BubbleSort()
directly called with an array of long
s.o
- an array of type long
containing the data to sort.BubbleSort()
public long[] BubbleSort(long[] o, int l, int r)
BubbleSort()
directly called with an array of long
s and an interval bounds
specification.o
- an array of type long
containing the data to sort.l
- lower interval boundr
- upper interval boundlong
containing the sorted elements of the interval o[l]
to o[r]
BubbleSort()
public float[] BubbleSort(float[] o)
BubbleSort()
directly called with an array of float
s.o
- an array of type float
containing the data to sort.BubbleSort()
public float[] BubbleSort(float[] o, int l, int r)
BubbleSort()
directly called with an array of float
s and an interval bounds
specification.o
- an array of type float
containing the data to sort.l
- lower interval boundr
- upper interval boundfloat
containing the sorted elements of the interval o[l]
to o[r]
BubbleSort()
public double[] BubbleSort(double[] o)
BubbleSort()
directly called with an array of double
s.o
- an array of type double
containing the data to sort.BubbleSort()
public double[] BubbleSort(double[] o, int l, int r)
BubbleSort()
directly called with an array of double
s and an interval bounds
specification.o
- an array of type double
containing the data to sort.l
- lower interval boundr
- upper interval bounddouble
containing the sorted elements of the interval o[l]
to o[r]
BubbleSort()
public char[] BubbleSort(char[] o)
BubbleSort()
directly called with an array of char
s.o
- an array of type char
containing the data to sort.BubbleSort()
public char[] BubbleSort(char[] o, int l, int r)
BubbleSort()
directly called with an array of char
s and an interval bounds
specification.o
- an array of type char
containing the data to sort.l
- lower interval boundr
- upper interval boundchar
containing the sorted elements of the interval o[l]
to o[r]
BubbleSort()
public List BubbleSort(BasicList L)
BubbleSort()
performed on a BasicList
.L
- a BasicList
containing the data to sort.BasicList
containing L
's sorted elements.BubbleSort()
public java.util.Enumeration BubbleSort(java.util.Enumeration enum)
BubbleSort()
performed on an Enumeration
.enum
- an object of type java.util.Enumeration
enumerating the elements to sort.Enumeration
which enumerates all elments in the right orderBubbleSort()
public java.lang.Object[] HeapSort(java.lang.Object[] o)
HeapSort()
directly called with an array of Object
s.o
- an array of type Object
containing the data to sort.HeapSort()
public java.lang.Object[] HeapSort(java.lang.Object[] o, int l, int r)
HeapSort()
directly called with an array of Object
s and an interval bounds
specification.o
- an array of type Object
containing the data to sort.l
- lower interval boundr
- upper interval boundObject
containing the sorted elements of the interval o[l]
to o[r]
HeapSort()
public int[] HeapSort(int[] o)
HeapSort()
directly called with an array of int
s.o
- an array of type int
containing the data to sort.HeapSort()
public int[] HeapSort(int[] o, int l, int r)
HeapSort()
directly called with an array of int
s and an interval bounds
specification.o
- an array of type int
containing the data to sort.l
- lower interval boundr
- upper interval boundint
containing the sorted elements of the interval o[l]
to o[r]
HeapSort()
public long[] HeapSort(long[] o)
HeapSort()
directly called with an array of long
s.o
- an array of type long
containing the data to sort.HeapSort()
public long[] HeapSort(long[] o, int l, int r)
HeapSort()
directly called with an array of long
s and an interval bounds
specification.o
- an array of type long
containing the data to sort.l
- lower interval boundr
- upper interval boundlong
containing the sorted elements of the interval o[l]
to o[r]
HeapSort()
public float[] HeapSort(float[] o)
HeapSort()
directly called with an array of float
s.o
- an array of type float
containing the data to sort.HeapSort()
public float[] HeapSort(float[] o, int l, int r)
HeapSort()
directly called with an array of float
s and an interval bounds
specification.o
- an array of type float
containing the data to sort.l
- lower interval boundr
- upper interval boundfloat
containing the sorted elements of the interval o[l]
to o[r]
HeapSort()
public double[] HeapSort(double[] o)
HeapSort()
directly called with an array of double
s.o
- an array of type double
containing the data to sort.HeapSort()
public double[] HeapSort(double[] o, int l, int r)
HeapSort()
directly called with an array of double
s
and an interval bounds specification.o
- an array of type double
containing the data to sort.l
- lower interval boundr
- upper interval bounddouble
containing the sorted elements of the interval
o[l]
to o[r]
HeapSort()
public char[] HeapSort(char[] o)
HeapSort()
directly called with an array of char
s.o
- an array of type char
containing the data to sort.HeapSort()
public char[] HeapSort(char[] o, int l, int r)
HeapSort()
directly called with an array of char
s and an interval bounds
specification.o
- an array of type char
containing the data to sort.l
- lower interval boundr
- upper interval boundchar
containing the sorted elements of the interval o[l]
to o[r]
HeapSort()
public List HeapSort(BasicList L)
HeapSort()
performed on a BasicList
.L
- a BasicList
containing the data to sort.BasicList
containing L
's sorted elements.HeapSort()
public java.util.Enumeration HeapSort(java.util.Enumeration enum)
HeapSort()
performed on an Enumeration
.enum
- an object of type java.util.Enumeration
enumerating the elements to sort.Enumeration
which enumerates all elments in the
right orderHeapSort()
public java.lang.Object[] QuickSort(java.lang.Object[] o)
QuickSort()
directly called with an array of Object
s.o
- an array of type Object
containing the data to sort.QuickSort()
public java.lang.Object[] QuickSort(java.lang.Object[] o, int l, int r)
QuickSort()
directly called with an array of Object
s and an interval bounds
specification.o
- an array of type Object
containing the data to sort.l
- lower interval boundr
- upper interval boundObject
containing the sorted elements of the interval o[l]
to o[r]
QuickSort()
public int[] QuickSort(int[] o)
QuickSort()
directly called with an array of int
s.o
- an array of type int
containing the data to sort.QuickSort()
public int[] QuickSort(int[] o, int l, int r)
QuickSort()
directly called with an array of int
s
and an interval bounds specification.o
- an array of type int
containing the data to sort.l
- lower interval boundr
- upper interval boundint
containing the sorted elements
of the interval o[l]
to o[r]
QuickSort()
public long[] QuickSort(long[] o)
QuickSort()
directly called with an array of long
s.o
- an array of type long
containing the data to sort.QuickSort()
public long[] QuickSort(long[] o, int l, int r)
QuickSort()
directly called with an array of long
s
and an interval bounds specification.o
- an array of type long
containing the data to sort.l
- lower interval boundr
- upper interval boundlong
containing the sorted elements
of the interval o[l]
to o[r]
QuickSort()
public float[] QuickSort(float[] o)
QuickSort()
directly called with an array of float
s.o
- an array of type float
containing the data to sort.QuickSort()
public float[] QuickSort(float[] o, int l, int r)
QuickSort()
directly called with an array of float
s
and an interval bounds specification.o
- an array of type float
containing the data to sort.l
- lower interval boundr
- upper interval boundfloat
containing the sorted elements
of the interval o[l]
to o[r]
QuickSort()
public double[] QuickSort(double[] o)
QuickSort()
directly called with an array of double
s.o
- an array of type double
containing the data to sort.QuickSort()
public double[] QuickSort(double[] o, int l, int r)
QuickSort()
directly called with an array of double
s
and an interval bounds specification.o
- an array of type double
containing the data to sort.l
- lower interval boundr
- upper interval bounddouble
containing the sorted elements
of the interval o[l]
to o[r]
QuickSort()
public char[] QuickSort(char[] o)
QuickSort()
directly called with an array of char
s.o
- an array of type char
containing the data to sort.QuickSort()
public char[] QuickSort(char[] o, int l, int r)
QuickSort()
directly called with an array of char
s
and an interval bounds specification.o
- an array of type char
containing the data to sort.l
- lower interval boundr
- upper interval boundchar
containing the sorted elements
of the interval o[l]
to o[r]
QuickSort()
public List QuickSort(BasicList L)
QuickSort()
performed on a BasicList
.L
- a BasicList
containing the data to sort.BasicList
containing L
's sorted elements.QuickSort()
public java.util.Enumeration QuickSort(java.util.Enumeration enum)
QuickSort()
performed on an Enumeration
.enum
- an object of type java.util.Enumeration
enumerating the elements to sort.Enumeration
which enumerates all elments in the
right orderQuickSort()
public java.lang.Object[] sort(java.lang.Object[] o)
sort()
directly called with an array of Object
s.o
- an array of type Object
containing the data to sort.sort()
public java.lang.Object[] sort(java.lang.Object[] o, int l, int r)
sort()
directly called with an array of Object
s and an interval bounds
specification.o
- an array of type Object
containing the data to sort.l
- lower interval boundr
- upper interval boundObject
containing the sorted elements of the interval o[l]
to o[r]
sort()
public int[] sort(int[] o)
sort()
directly called with an array of int
s.o
- an array of type int
containing the data to sort.sort()
public int[] sort(int[] o, int l, int r)
sort()
directly called with an array of int
s
and an interval bounds specification.o
- an array of type int
containing the data to sort.l
- lower interval boundr
- upper interval boundint
containing the sorted elements
of the interval o[l]
to o[r]
sort()
public long[] sort(long[] o)
sort()
directly called with an array of long
s.o
- an array of type long
containing the data to sort.sort()
public long[] sort(long[] o, int l, int r)
sort()
directly called with an array of long
s
and an interval bounds specification.o
- an array of type long
containing the data to sort.l
- lower interval boundr
- upper interval boundlong
containing the sorted elements
of the interval o[l]
to o[r]
sort()
public float[] sort(float[] o)
sort()
directly called with an array of float
s.o
- an array of type float
containing the data to sort.sort()
public float[] sort(float[] o, int l, int r)
sort()
directly called with an array of float
s
and an interval bounds specification.o
- an array of type float
containing the data to sort.l
- lower interval boundr
- upper interval boundfloat
containing the sorted elements
of the interval o[l]
to o[r]
sort()
public double[] sort(double[] o)
sort()
directly called with an array of double
s.o
- an array of type double
containing the data to sort.sort()
public double[] sort(double[] o, int l, int r)
sort()
directly called with an array of double
s
and an interval bounds specification.o
- an array of type double
containing the data to sort.l
- lower interval boundr
- upper interval bounddouble
containing the sorted elements
of the interval o[l]
to o[r]
sort()
public char[] sort(char[] o)
sort()
directly called with an array of char
s.o
- an array of type char
containing the data to sort.sort()
public char[] sort(char[] o, int l, int r)
sort()
directly called with an array of char
s
and an interval bounds specification.o
- an array of type char
containing the data to sort.l
- lower interval boundr
- upper interval boundchar
containing the sorted elements
of the interval o[l]
to o[r]
sort()
public List sort(BasicList L)
sort()
performed on a BasicList
.L
- a BasicList
containing the data to sort.BasicList
containing L
's sorted elements.sort()
public java.util.Enumeration sort(java.util.Enumeration enum)
sort()
performed on an Enumeration
.enum
- an object of type java.util.Enumeration
enumerating the elements to sort.Enumeration
which enumerates all elments in the
right ordersort()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |