Sorting/Longs/figure4-8.c File Reference

Generate Figure 4-8 of the book

Example (test case) for median sort and produces image. More...

#include <stdio.h>
#include "assert.h"
#include "dot.h"

Functions

void mediansort (int id, long *ar, int(*cmp)(const long *a, const long *b), int left, int right)
int cmp (const long *a, const long *b)
 used only for longs.
void debug (long *a, int n)
 Debugging output.
int main (int argc, char **argv)
 Launch the application.


Detailed Description

Generate Figure 4-8 of the book

Example (test case) for median sort and produces image.

Author:
George Heineman
Date:
6/15/08

Function Documentation

int cmp ( const long *  a,
const long *  b 
)

used only for longs.

void debug ( long *  a,
int  n 
)

Debugging output.

int main ( int  argc,
char **  argv 
)

Launch the application.

void mediansort ( int  id,
long *  ar,
int(*)(const long *a, const long *b cmp,
int  left,
int  right 
)

Algorithm Development Kit 1.0