23 #ifndef MASSCOMPAREFUNCTORS_H 24 #define MASSCOMPAREFUNCTORS_H 43 return 1/resolution * 1e6;
48 template<
typename TReal>
56 ):window_(window),ppm_(1e-6)
62 return((window_ * val)*ppm_);
68 return( std::abs(pval - cval) <
operator()(pval) );
73 template<
typename TReal>
91 return( std::abs(pval - cval) <
operator()(pval) );
96 template<
typename TReal>
106 FTMSCompFunctor( value_type window , value_type mass ) : window_(window) , mass_(mass)
108 invR_ = sqrt(window_)/mass_;
114 value_type pR = (val*invR_);
120 return( std::abs( pval - cval ) <
operator()(pval) );
129 #endif // MASSCOMPAREFUNCTORS_H
bool operator()(value_type pval, value_type cval)
if dist pval cval smaller then window returns true
bool operator()(value_type pval, value_type cval)
brief compares two masses, returns true if they match false otherwise
TODO Do checking on TReal thats a real.
value_type operator()(value_type val)
brief returns size of windows for this mass
value_type operator()(value_type val)
returns window at mass
FTMSCompFunctor(value_type window, value_type mass)
brief window at mass, i.e. 0.1 Da at 400Da
PPMCompFunctor(value_type window)
DaCompFunctor(value_type window)
value_type operator()(value_type)
window at mass
EQUISPACEINTERPOL Interpolation on a equidistantly spaced grid.
double resolution2ppm(double resolution)
bool operator()(value_type pval, value_type cval)
if dist pval cval smaller then window returns true
Da Comparator - constant mass error.