bpmnr/nr_median.c

Go to the documentation of this file.
00001 
00005 #include <bpm/bpm_messages.h>
00006 #include <bpm/bpm_nr.h>
00007 
00013 double nr_median( int n, double *arr ) {
00014   
00015   if( ! arr ) {
00016     bpm_error( "Invalid array in nr_median(...)", 
00017                __FILE__, __LINE__ );
00018     return -DBL_MAX;
00019   }
00020 
00021   return nr_select( (int) (n / 2), n, arr );
00022 }
00023              

Generated on Thu Jan 10 10:18:04 2008 for libbpm by  doxygen 1.5.1