org.amino.alg.sort
Interface Sorter

All Known Implementing Classes:
AbstractSorter, DefaultSorter, InsertionSorter, ParallelQuickSorterWorkStealing, QuickSorter

public interface Sorter

Interface Sorter

An interface provided by various sorting classes.

Interface methods operate on arrays and List collections. Element types for arrays may be builtin types or objects

See Also:
Arrays, Collections

Method Summary
 void reverse(byte[] a)
          Sort array using reverse natural (descending) order.
 void reverse(byte[] a, int from, int to)
          Sort array using reverse natural (descending) order.
 void reverse(char[] a)
          Sort array using reverse natural (descending) order.
 void reverse(char[] a, int from, int to)
          Sort array using reverse natural (descending) order.
 void reverse(double[] a)
          Sort array using reverse natural (descending) order.
 void reverse(double[] a, int from, int to)
          Sort array using reverse natural (descending) order.
 void reverse(float[] a)
          Sort array using reverse natural (descending) order.
 void reverse(float[] a, int from, int to)
          Sort array using reverse natural (descending) order.
 void reverse(int[] a)
          Sort array using reverse natural (descending) order.
 void reverse(int[] a, int from, int to)
          Sort array using reverse natural (descending) order.
<T extends java.lang.Comparable<T>>
void
reverse(java.util.List<T> a)
          Sort List using reverse natural (descending) order.
<T extends java.lang.Comparable<T>>
void
reverse(java.util.List<T> a, int from, int to)
           
 void reverse(long[] a)
          Sort array using reverse natural (descending) order.
 void reverse(long[] a, int from, int to)
          Sort array using reverse natural (descending) order.
 void reverse(short[] a)
          Sort array using reverse natural (descending) order.
 void reverse(short[] a, int from, int to)
          Sort array using reverse natural (descending) order.
<T extends java.lang.Comparable<T>>
void
reverse(T[] a)
          Sort array using reverse natural (descending) order.
<T extends java.lang.Comparable<T>>
void
reverse(T[] a, int from, int to)
          Sort array using reverse natural (descending) order.
 void sort(byte[] a)
           
 void sort(byte[] a, int from, int to)
           
 void sort(char[] a)
           
 void sort(char[] a, int from, int to)
           
 void sort(double[] a)
           
 void sort(double[] a, int from, int to)
           
 void sort(float[] a)
           
 void sort(float[] a, int from, int to)
           
 void sort(int[] a)
           
 void sort(int[] a, int from, int to)
           
<T extends java.lang.Comparable<T>>
void
sort(java.util.List<T> a)
           
<T extends java.lang.Comparable<T>>
void
sort(java.util.List<T> a, java.util.Comparator<T> c)
           
<T extends java.lang.Comparable<T>>
void
sort(java.util.List<T> a, int from, int to)
           
<T extends java.lang.Comparable<T>>
void
sort(java.util.List<T> a, int from, int to, java.util.Comparator<T> c)
           
 void sort(long[] a)
           
 void sort(long[] a, int from, int to)
           
 void sort(short[] a)
           
 void sort(short[] a, int from, int to)
           
<T extends java.lang.Comparable<T>>
void
sort(T[] a)
           
<T extends java.lang.Comparable<T>>
void
sort(T[] a, java.util.Comparator<T> c)
           
<T extends java.lang.Comparable<T>>
void
sort(T[] a, int from, int to)
           
<T extends java.lang.Comparable<T>>
void
sort(T[] a, int from, int to, java.util.Comparator<T> c)
           
 void sortp(int[] p, int[] a, int from, int to)
          Sort array and return a permuted index vector.
 

Method Detail

sort

void sort(byte[] a)
Parameters:
a - array upon which to operate.
See Also:
Arrays.sort(byte[])

reverse

void reverse(byte[] a)
Sort array using reverse natural (descending) order.

Parameters:
a - array upon which to operate.

sort

void sort(byte[] a,
          int from,
          int to)
Parameters:
a - array upon which to operate.
from - starting array index starting array index
to - ending array index
See Also:
Arrays.sort(byte[], int, int)

reverse

void reverse(byte[] a,
             int from,
             int to)
Sort array using reverse natural (descending) order.

Parameters:
a - array upon which to operate.
from - starting array index starting array index
to - ending array index ending array index

sort

void sort(char[] a)
Parameters:
a - array upon which to operate.
See Also:
Arrays.sort(byte[])

reverse

void reverse(char[] a)
Sort array using reverse natural (descending) order.

Parameters:
a - array upon which to operate.

sort

void sort(char[] a,
          int from,
          int to)
Parameters:
a - array upon which to operate.
from - starting array index starting array index
to - ending array index ending array index
See Also:
Arrays.sort(byte[], int, int)

reverse

void reverse(char[] a,
             int from,
             int to)
Sort array using reverse natural (descending) order.

Parameters:
a - array upon which to operate.
from - starting array index starting array index
to - ending array index

sort

void sort(short[] a)
Parameters:
a - array upon which to operate.
See Also:
Arrays.sort(short[])

reverse

void reverse(short[] a)
Sort array using reverse natural (descending) order.

Parameters:
a - array upon which to operate.

sort

void sort(short[] a,
          int from,
          int to)
Parameters:
a - array upon which to operate.
from - starting array index
to - ending array index
See Also:
Arrays.sort(short[], int, int)

reverse

void reverse(short[] a,
             int from,
             int to)
Sort array using reverse natural (descending) order.

Parameters:
a - array upon which to operate.
from - starting array index
to - ending array index

sort

void sort(int[] a)
Parameters:
a - array upon which to operate.
See Also:
Arrays.sort(short[])

reverse

void reverse(int[] a)
Sort array using reverse natural (descending) order.

Parameters:
a - array upon which to operate.

sort

void sort(int[] a,
          int from,
          int to)
Parameters:
a - array upon which to operate.
from - starting array index
to - ending array index
See Also:
Arrays.sort(short[], int, int)

sortp

void sortp(int[] p,
           int[] a,
           int from,
           int to)
Sort array and return a permuted index vector.

Parameters:
p - the array
a - array upon which to operate.
from - starting array index
to - ending array index

reverse

void reverse(int[] a,
             int from,
             int to)
Sort array using reverse natural (descending) order.

Parameters:
a - array upon which to operate.
from - starting array index
to - ending array index

sort

void sort(long[] a)
Parameters:
a - array upon which to operate.
See Also:
Arrays.sort(short[])

reverse

void reverse(long[] a)
Sort array using reverse natural (descending) order.

Parameters:
a - array upon which to operate.

sort

void sort(long[] a,
          int from,
          int to)
Parameters:
a - array upon which to operate.
from - starting array index
to - ending array index
See Also:
Arrays.sort(short[], int, int)

reverse

void reverse(long[] a,
             int from,
             int to)
Sort array using reverse natural (descending) order.

Parameters:
a - array upon which to operate.
from - starting array index
to - ending array index

sort

void sort(float[] a)
Parameters:
a - array upon which to operate.
See Also:
Arrays.sort(short[])

reverse

void reverse(float[] a)
Sort array using reverse natural (descending) order.

Parameters:
a - array upon which to operate.

sort

void sort(float[] a,
          int from,
          int to)
Parameters:
a - array upon which to operate.
from - starting array index
to - ending array index
See Also:
Arrays.sort(short[], int, int)

reverse

void reverse(float[] a,
             int from,
             int to)
Sort array using reverse natural (descending) order.

Parameters:
a - array upon which to operate.
from - starting array index
to - ending array index

sort

void sort(double[] a)
Parameters:
a - array upon which to operate.
See Also:
Arrays.sort(short[])

reverse

void reverse(double[] a)
Sort array using reverse natural (descending) order.

Parameters:
a - array upon which to operate.

sort

void sort(double[] a,
          int from,
          int to)
Parameters:
a - array upon which to operate.
from - starting array index
to - ending array index
See Also:
Arrays.sort(short[], int, int)

reverse

void reverse(double[] a,
             int from,
             int to)
Sort array using reverse natural (descending) order.

Parameters:
a - array upon which to operate.
from - starting array index
to - ending array index

sort

<T extends java.lang.Comparable<T>> void sort(T[] a)
Type Parameters:
T - data type
Parameters:
a - array upon which to operate.
See Also:
Arrays.sort(Object[])

reverse

<T extends java.lang.Comparable<T>> void reverse(T[] a)
Sort array using reverse natural (descending) order.

Type Parameters:
T - data type
Parameters:
a - array upon which to operate.

sort

<T extends java.lang.Comparable<T>> void sort(T[] a,
                                              int from,
                                              int to)
Type Parameters:
T - data type
Parameters:
a - array upon which to operate.
from - starting array index
to - ending array index
See Also:
Arrays.sort(Object[], int, int)

reverse

<T extends java.lang.Comparable<T>> void reverse(T[] a,
                                                 int from,
                                                 int to)
Sort array using reverse natural (descending) order.

Type Parameters:
T - data type
Parameters:
a - array upon which to operate.
from - starting array index
to - ending array index

sort

<T extends java.lang.Comparable<T>> void sort(T[] a,
                                              java.util.Comparator<T> c)
Type Parameters:
T - data type
Parameters:
a - array upon which to operate.
c - comparator used to do comparison
See Also:
Arrays.sort(Object[], Comparator)

sort

<T extends java.lang.Comparable<T>> void sort(T[] a,
                                              int from,
                                              int to,
                                              java.util.Comparator<T> c)
Type Parameters:
T - data type
Parameters:
a - array upon which to operate.
from - starting array index
to - ending array index
c - comparator used to do comparison
See Also:
Arrays.sort(Object[], int, int, Comparator)

sort

<T extends java.lang.Comparable<T>> void sort(java.util.List<T> a)
Type Parameters:
T - data type
Parameters:
a - array upon which to operate.
See Also:
Collections.sort(List)

reverse

<T extends java.lang.Comparable<T>> void reverse(java.util.List<T> a)
Sort List using reverse natural (descending) order.

Type Parameters:
T - data type
Parameters:
a - array upon which to operate.

sort

<T extends java.lang.Comparable<T>> void sort(java.util.List<T> a,
                                              int from,
                                              int to)
Type Parameters:
T - data type
Parameters:
a - array upon which to operate.
from - starting array index
to - ending array index
See Also:
Collections.sort(List)

reverse

<T extends java.lang.Comparable<T>> void reverse(java.util.List<T> a,
                                                 int from,
                                                 int to)
Type Parameters:
T - data type
Parameters:
a - array upon which to operate.
from - starting array index
to - ending array index

sort

<T extends java.lang.Comparable<T>> void sort(java.util.List<T> a,
                                              java.util.Comparator<T> c)
Type Parameters:
T - data type
Parameters:
a - array upon which to operate.
c - comparator used to do comparison
See Also:
Collections.sort(List, Comparator)

sort

<T extends java.lang.Comparable<T>> void sort(java.util.List<T> a,
                                              int from,
                                              int to,
                                              java.util.Comparator<T> c)
Type Parameters:
T - data type
Parameters:
a - array upon which to operate.
from - starting array index
to - ending array index
c - comparator used to do comparison
See Also:
Collections.sort(List, Comparator)


Copyright © 2008. All Rights Reserved.