NAME

check_sort - Tests whether an array is sorted

SYNOPSIS

#include "l/l_sort.h"

Example compile flags (system dependent):
  -DLINUX_X86_64 -DLINUX_X86_64_OPTERON  -DGNU_COMPILER 
   -I/home/kobus/include
   -L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
  -lKJB                               -lfftw3  -lgsl -lgslcblas -ljpeg  -lSVM -lstdc++                    -lpthread -lSLATEC -lg2c    -lacml -lacml_mv -lblas -lg2c      -lncursesw 


int check_sort
(
	void *array,
	int num_elements,
	size_t element_size,
	int (*cmp_fn)(const void *,const void *)
);

DESCRIPTION

This funtion tests whether an array is sorted. The main use is to test sorting code. However, one can imagine other uses. Hences we expose this function.

RETURNS

TRUE (1) if the array is sorted, FALSE (0) otherwise.

DISCLAIMER

This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.

AUTHOR

Kobus Barnard

DOCUMENTER

Kobus Barnard

SEE ALSO

kjb_sort , int_sort , long_sort , binary_search , int_binary_search , long_binary_search , binary_search_int_array , binary_search_long_array , linear_search , int_linear_search , long_linear_search , linear_search_int_array , linear_search_long_array