23#ifndef _MZTOLERANCE_HPP_
24#define _MZTOLERANCE_HPP_
45 : value(_value), units(_units)
PWIZ_API_DECL Formula operator+(const Formula &a, const Formula &b)
PWIZ_API_DECL std::istream & operator>>(std::istream &is, MZTolerance &mzt)
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 operator==(const MZTolerance &a, const MZTolerance &b)
PWIZ_API_DECL double & operator+=(double &d, const MZTolerance &tolerance)
PWIZ_API_DECL Formula operator-(const Formula &a, const Formula &b)
PWIZ_API_DECL bool operator!=(const MZTolerance &a, const MZTolerance &b)
PWIZ_API_DECL std::ostream & operator<<(std::ostream &os, const MassAbundance &ma)
PWIZ_API_DECL double & operator-=(double &d, const MZTolerance &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)
struct for expressing m/z tolerance in either amu or ppm
MZTolerance(double _value=0, Units _units=MZ)