contrib/mul/pdf1d/pdf1d_resample.h
Go to the documentation of this file.
00001 #ifndef pdf1d_resample_h
00002 #define pdf1d_resample_h
00003 //:
00004 // \file
00005 // \author Tim Cootes
00006 // \brief Select random sample of data with replacement.
00007 
00008 #include <vnl/vnl_vector.h>
00009 
00010 //: Fill x with ns samples drawn at random from d
00011 //  If ns not specified (or zero) then draw d.size() samples from d
00012 void pdf1d_resample(vnl_vector<double>& x, const vnl_vector<double>& d, int ns=0);
00013 
00014 //: Fill x with ns samples drawn at random from d[0..n-1]
00015 //  If ns not specified (or zero) then draw d.size() samples from d
00016 void pdf1d_resample(vnl_vector<double>& x, const double* d, int n, int ns=0);
00017 
00018 
00019 #endif // pdf1d_resample_h