37 template <
typename DifferenceType>
40 return fabs(diff) >= epsilon;
53 template <
typename ElementToOutput1,
typename ElementToOutput2>
55 ElementToOutput1 elem1, ElementToOutput2 elem2,
mitk::ScalarType eps,
bool verbose,
bool isEqual)
57 if (verbose && !isEqual)
59 MITK_INFO <<
typeid(ElementToOutput1).name() <<
" and " <<
typeid(ElementToOutput2).name()
60 <<
" not equal. Lefthandside " << std::setprecision(12) << elem1 <<
" - Righthandside " << elem2
61 <<
" - epsilon " <<
eps;
void ConditionalOutputOfDifference(ElementToOutput1 elem1, ElementToOutput2 elem2, mitk::ScalarType eps, bool verbose, bool isEqual)
MITKCORE_EXPORT const ScalarType eps
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.
bool DifferenceBiggerOrEqualEps(DifferenceType diff, mitk::ScalarType epsilon=mitk::eps)