00001 #include "SimpleMinMaxPeakFinder.h" 00002 00003 SimpleMinMaxPeakFinder::SimpleMinMaxPeakFinder(double minValue, double minDifference): 00004 SimplePeakFinder(minValue, minDifference) 00005 { 00006 00007 } 00008 00009 bool SimpleMinMaxPeakFinder::isPeak(const std::vector<double>& signal, unsigned int index) const { 00010 bool minPeak = signal[index] < -m_minValue && 00011 signal[index] - signal[index - 1] < -m_minDifference && 00012 signal[index] - signal[index + 1] < -m_minDifference; 00013 return SimplePeakFinder::isPeak(signal,index) || minPeak; 00014 }