Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Quicksort Class Reference

List of all members.

Public Methods

 Quicksort (Object array[])
void sort (java.util.Comparator comp)
void sort (int low, int high, java.util.Comparator comp)
void swap (int i, int j)

Detailed Description

Quicksort is a setup for sorting an array of objects using the Quicksort algorithm. Comparisons are done with an arbitrary Compartor.

Definition at line 12 of file Quicksort.java.


Constructor & Destructor Documentation

Quicksort::Quicksort ( Object array[] ) [inline]
 

Constructor for the Quicksort setup

Parameters:
the   array of objects to be sorted

Definition at line 26 of file Quicksort.java.


Member Function Documentation

void Quicksort::sort ( int low,
int high,
java.util.Comparator comp ) [inline]
 

Sort the array elements at indices from low to high, inclusive.

Definition at line 46 of file Quicksort.java.

void Quicksort::sort ( java.util.Comparator comp ) [inline]
 

Sort the array in place using the argument comparator

Definition at line 36 of file Quicksort.java.

Referenced by sort(), and OpenList::sort().

void Quicksort::swap ( int i,
int j ) [inline]
 

swap(i, j) interchanges the values in a[i] and a[j]

Definition at line 78 of file Quicksort.java.

Referenced by sort().


The documentation for this class was generated from the following file:
Generated at Wed Feb 19 23:28:37 2003 for OpenList by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001