| OpenMS 2.5.0

Public Member Functions | Public Attributes | List of all members
EqualInTolerance< CompareType > Struct Template Reference

Struct for binary predicate to consider equality with a certain tolerance. More...

`#include <OpenMS/KERNEL/ComparatorUtils.h>`

Inheritance diagram for EqualInTolerance< CompareType >:

## Public Member Functions

| EqualInTolerance (CompareType &c)
bool | operator() (CompareType i, CompareType j)

## Public Attributes

CompareType & | tolerance

## Detailed Description

### template<typename CompareType>
struct OpenMS::EqualInTolerance< CompareType >

Struct for binary predicate to consider equality with a certain tolerance.

Parameters

  i | first value
  i | second value

Returns
  bool if the two parameters are in tolerance close to each other

## Constructor & Destructor Documentation

## ◆ EqualInTolerance()

EqualInTolerance | ( | CompareType & | c | ) |

inline explicit

## Member Function Documentation

## ◆ operator()()

bool operator() | ( | CompareType | i,
|  | CompareType | j
| ) |  |

inline

References EqualInTolerance< CompareType >::tolerance.

## Member Data Documentation

## ◆ tolerance

CompareType& tolerance

Referenced by EqualInTolerance< CompareType >::operator()().