CoinRelFltEq

Equality to a scaled (relative) tolerance.

Equality to a scaled (relative) tolerance.

Description

Operands are considered equal if their difference is within a scaled epsilon calculated as epsilon_*(1+max(|f1|,|f2|)). This is preferred over absolute tolerance when comparing values that span many orders of magnitude.

Public Methods

CoinRelFltEq

 CoinRelFltEq()

CoinRelFltEq

Alternate constructor with epsilon as a parameter.

 CoinRelFltEq(const double epsilon)

Parameters:

~CoinRelFltEq

Destructor.

 ~CoinRelFltEq()

CoinRelFltEq

Copy constructor.

 CoinRelFltEq(const CoinRelFltEq & src)

Parameters:

operator=

Assignment.

CoinRelFltEq & operator=(const CoinRelFltEq & rhs)

Parameters:

operator()

Compare function.

bool operator()(const double f1, const double f2)

Parameters:

Source

Header: layer-0/CoinUtils/src/CoinFloatEqual.hpp