41 const double noiseFactor = 666;
42 const unsigned int detectionRadius = 13;
43 auto_ptr<PeakDetectorNaive> pd = PeakDetectorNaive::create(noiseFactor, detectionRadius);
74 if (
os_) copy(fd.
data().begin(), fd.
data().end(), ostream_iterator<FrequencyDatum>(*
os_,
"\n"));
80 const double noiseFactor = 1;
82 auto_ptr<PeakDetectorNaive> pdn1 = PeakDetectorNaive::create(noiseFactor, 1);
86 auto_ptr<PeakDetectorNaive> pdn2 = PeakDetectorNaive::create(noiseFactor, 2);
90 auto_ptr<PeakDetectorNaive> pdn3 = PeakDetectorNaive::create(noiseFactor, 3);
96 *
os_ <<
"pd:\n" << pd << endl;
98 for (
unsigned int i=0; i<pd.
scans.size(); i++)
100 *
os_ <<
"scan " << i <<
":\n";
114 int main(
int argc,
char* argv[])
120 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
121 if (
os_) *
os_ <<
"PeakDetectorNaiveTest\n";