23 #ifndef _MZTOLERANCE_HPP_ 24 #define _MZTOLERANCE_HPP_ 45 : value(_value), units(_units)
72 #endif // _MZTOLERANCE_HPP_
MZTolerance(double _value=0, Units _units=MZ)
PWIZ_API_DECL double & operator+=(double &d, const MZTolerance &tolerance)
PWIZ_API_DECL bool operator==(const MZTolerance &a, const MZTolerance &b)
PWIZ_API_DECL double & operator-=(double &d, const MZTolerance &tolerance)
PWIZ_API_DECL std::ostream & operator<<(std::ostream &os, const MassAbundance &ma)
PWIZ_API_DECL Formula operator+(const Formula &a, const Formula &b)
PWIZ_API_DECL std::istream & operator>>(std::istream &is, MZTolerance &mzt)
struct for expressing m/z tolerance in either amu or ppm
PWIZ_API_DECL bool isWithinTolerance(double a, double b, const MZTolerance &tolerance)
returns true iff a is in (b-tolerance, b+tolerance)
PWIZ_API_DECL bool lessThanTolerance(double a, double b, const MZTolerance &tolerance)
returns true iff b - a is greater than the value in tolerance (useful for matching sorted mass lists)...
PWIZ_API_DECL bool operator!=(const MZTolerance &a, const MZTolerance &b)
PWIZ_API_DECL Formula operator-(const Formula &a, const Formula &b)