contrib/mul/vpdfl/vpdfl_resample.h
Go to the documentation of this file.
00001 #ifndef vpdfl_resample_h
00002 #define vpdfl_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 #include <vcl_vector.h>
00010 
00011 //: Fill x with ns samples drawn at random from d
00012 //  If ns not specified (or zero) then draw d.size() samples from d
00013 void vpdfl_resample(vcl_vector<vnl_vector<double> >& x,
00014                     const vcl_vector<vnl_vector<double> >& d, int ns=0);
00015 
00016 //: Fill x with ns samples drawn at random from d[0..n-1]
00017 //  If ns not specified (or zero) then draw d.size() samples from d
00018 void vpdfl_resample(vcl_vector<vnl_vector<double> >& x,
00019                     const vnl_vector<double>* d, int n, int ns=0);
00020 
00021 
00022 #endif // vpdfl_resample_h