17 #include <boost/bind.hpp>
20 using namespace kome::objects;
25 #define new new( _NORMAL_BLOCK, __FILE__, __LINE__ )
26 #define malloc( s ) _malloc_dbg( s, _NORMAL_BLOCK, __FILE__, __LINE__ )
55 for(
unsigned int i = 0; i <
m_peaks.size() && idx < 0; i++ ) {
69 boost::bind(
lessRt, _1, _2, desc )
78 boost::bind(
lessMz, _1, _2, desc )
118 if( peak2dElement !=
NULL && peak2dElement->
getId() > 0 ){
119 return peak2dElement->
getId()+1;
126 for(
unsigned int i=0; i <
m_peaks.size(); i++ ){
127 if(
m_peaks[i]->getId() == id ){
static bool lessMz(Peak2DElement *p0, Peak2DElement *p1, bool desc)
compares peaks to sort by m/z
interfaces of Peaks2DArray class
virtual ~Peaks2DArray()
destructor
Peak2DElement * getPeak(const unsigned int idx)
gets peak element
static bool lessRt(Peak2DElement *p0, Peak2DElement *p1, bool desc)
compares peaks to sort by RT
void sortByRt(const bool desc)
sorts peaks by RT
interfaces of Peak2DElement class
void sortByIntensity(const bool desc)
sorts peaks by intensity param desc descending order flag
Peak2DElement * getPeakById(int id)
gets peak element by peak2d id
int searchPeak(Peak2DElement *peak)
searches peak
unsigned int getNumberOfPeaks()
gets the number of peaks
int getId()
gets peak2d id
std::vector< Peak2DElement * > m_peaks
int issueId(Peak2DElement *peak2dElement)
to issue the peak2d id
2-dimentional peak element
Peaks2DArray()
constructor
static bool lessIntensity(Peak2DElement *p0, Peak2DElement *p1, bool desc)
compares peaks to sort by intensity
double getIntensity()
gets intensity
void sortByMz(const bool desc)
sorts peaks by m/z