25 template <
typename DifferenceType>
28 return fabs(diff) >= epsilon;
41 template <
typename ElementToOutput1,
typename ElementToOutput2>
43 ElementToOutput1 elem1, ElementToOutput2 elem2,
mitk::ScalarType eps,
bool verbose,
bool isEqual)
45 if (verbose && !isEqual)
47 MITK_INFO <<
typeid(ElementToOutput1).name() <<
" and " <<
typeid(ElementToOutput2).name()
48 <<
" not equal. Lefthandside " << std::setprecision(12) << elem1 <<
" - Righthandside " << elem2
49 <<
" - epsilon " <<
eps;
void ConditionalOutputOfDifference(ElementToOutput1 elem1, ElementToOutput2 elem2, mitk::ScalarType eps, bool verbose, bool isEqual)
DataCollection - Class to facilitate loading/accessing structured data.
MITKNEWMODULE_EXPORT bool Equal(mitk::ExampleDataStructure *leftHandSide, mitk::ExampleDataStructure *rightHandSide, mitk::ScalarType eps, bool verbose)
Returns true if the example data structures are considered equal.
MITKCORE_EXPORT const ScalarType eps
bool DifferenceBiggerOrEqualEps(DifferenceType diff, mitk::ScalarType epsilon=mitk::eps)