quicksort.h File Reference

#include "datatypes.h"
Include dependency graph for quicksort.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void quicksort (IndexedList a[], int left, int right)
void swap (IndexedList a[], int i, int j)
 Swap elements i and j in the indexed list.
int Random (int i, int j)

Detailed Description

Author:
Ian Bond, IfA, University of Edinburgh

Function Documentation

void quicksort ( IndexedList  a[],
int  left,
int  right 
)

Implementation of standard libray C qsort function to sort the values in the indexed list while keeping track of their original indicies.

References quicksort(), Random(), and swap().

Referenced by prepare_detections_list(), and quicksort().

int Random ( int  i,
int  j 
)

Randomiser used by quicksort to avoid the worst case perfomance where the input array is already sorted (which could happen in our data.

Referenced by quicksort().

void swap ( IndexedList  a[],
int  i,
int  j 
)

Swap elements i and j in the indexed list.

References IndexedList::index, and IndexedList::value.

Referenced by quicksort().

Generated on Mon Oct 4 10:39:53 2010 for WsaTools by  doxygen 1.6.3