contrib/mul/pdf1d/pdf1d_compare_samples.h
Go to the documentation of this file.
00001 #ifndef pdf1d_compare_samples_h
00002 #define pdf1d_compare_samples_h
00003 //:
00004 // \file
00005 // \author Tim Cootes
00006 // \brief Functions to compare sets of samples.
00007 
00008 #include <vcl_vector.h>
00009 
00010 //: Return true if x1[i] significantly larger than x2[j]
00011 //  Essentially tests if on average a sample from x1 is larger than
00012 //  a proportion p of those from x2
00013 bool pdf1d_larger_samples(const double* x1, int n1, const double* x2, int n2, double p=0.6);
00014 
00015 //: Return true if x1[i] significantly smaller than x2[j]
00016 //  Essentially tests if on average a sample from x1 is smaller than
00017 //  a proportion p of those from x2
00018 bool pdf1d_smaller_samples(const double* x1, int n1, const double* x2, int n2, double p=0.6);
00019 
00020 //: Return the average number of elements of x2 greater than each x1[i]
00021 double pdf1d_prop_larger(const double* x1, int n1, const double* x2, int n2);
00022 
00023 //: Select the samples which are on average largest.
00024 //  x[i] is considered larger than x[j] if on average each element of x[i] is
00025 //  larger than a proportion p of those in x[j].
00026 //  Where there is ambiguity return smallest index.
00027 // \param x[i] pointer to data with n[i] elements
00028 int pdf1d_select_largest_samples(vcl_vector<const double*>& x, vcl_vector<int>& n, double p=0.6);
00029 #endif // pdf1d_compare_samples_h