Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FloatComparisons.hpp File Reference
#include <boost/test/unit_test.hpp>
#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Utilities/TypeTraits.hpp"
#include <algorithm>
#include <limits>
+ Include dependency graph for FloatComparisons.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Acts
 Acts includes to create all necessary definitions.
 
namespace  Acts::Test
 
namespace  Acts::Test::float_compare_internal
 

Macros

#define CHECK_CLOSE_REL(val, ref, reltol)   BOOST_CHECK(Acts::Test::checkCloseRel((val), (ref), (reltol)))
 
#define CHECK_CLOSE_ABS(val, ref, abstol)   BOOST_CHECK(Acts::Test::checkCloseAbs((val), (ref), (abstol)))
 
#define CHECK_SMALL(val, small)   BOOST_CHECK(Acts::Test::checkSmall((val), (small)))
 
#define CHECK_CLOSE_OR_SMALL(val, ref, reltol, small)   BOOST_CHECK(Acts::Test::checkCloseOrSmall((val), (ref), (reltol), (small)))
 
#define CHECK_CLOSE_COVARIANCE(val, ref, tol)   BOOST_CHECK(Acts::Test::checkCloseCovariance((val), (ref), (tol)))
 

Typedefs

using Acts::Test::float_compare_internal::predicate_result = boost::test_tools::predicate_result
 
using Acts::Test::float_compare_internal::ScalarComparison = std::function< predicate_result(double, double)>
 
template<typename T >
using Acts::Test::float_compare_internal::has_begin_t = decltype(std::declval< T >().cbegin())
 
template<typename T >
using Acts::Test::float_compare_internal::has_end_t = decltype(std::declval< T >().cend())
 
template<typename T >
using Acts::Test::float_compare_internal::has_eval_t = decltype(std::declval< T >().eval())
 

Functions

ScalarComparison Acts::Test::float_compare_internal::closeOrSmall (double reltol, double small)
 
ScalarComparison Acts::Test::float_compare_internal::closeAbs (double abstol)
 
template<typename Derived1 , typename Derived2 >
predicate_result Acts::Test::float_compare_internal::matrixCompare (const Eigen::DenseBase< Derived1 > &val, const Eigen::DenseBase< Derived2 > &ref, ScalarComparison &&compareImpl)
 
template<typename Container , typename = std::enable_if_t< !Acts::Concepts::exists<has_eval_t, Container> && Acts::Concepts::exists<has_begin_t, Container> && Acts::Concepts::exists<has_end_t, Container>, int>>
predicate_result Acts::Test::float_compare_internal::compare (const Container &val, const Container &ref, ScalarComparison &&compareImpl)
 
template<typename T , typename U >
predicate_result Acts::Test::float_compare_internal::compare (const Eigen::DenseBase< T > &val, const Eigen::DenseBase< U > &ref, ScalarComparison &&compareImpl)
 
predicate_result Acts::Test::float_compare_internal::compare (const Transform3 &val, const Transform3 &ref, ScalarComparison &&compareImpl)
 
predicate_result Acts::Test::float_compare_internal::compare (double val, double ref, ScalarComparison &&compareImpl)
 
template<typename T , typename U >
boost::test_tools::predicate_result Acts::Test::checkCloseRel (const T &val, const U &ref, double reltol)
 
template<typename T , typename U >
boost::test_tools::predicate_result Acts::Test::checkCloseAbs (const T &val, const U &ref, double abstol)
 
template<typename T >
boost::test_tools::predicate_result Acts::Test::checkSmall (const T &val, double small)
 
template<typename T , typename U >
boost::test_tools::predicate_result Acts::Test::checkCloseOrSmall (const T &val, const U &ref, double reltol, double small)
 
template<typename val_t , typename ref_t >
boost::test_tools::predicate_result Acts::Test::checkCloseCovariance (const Eigen::MatrixBase< val_t > &val, const Eigen::MatrixBase< ref_t > &ref, double tol)
 

Macro Definition Documentation

#define CHECK_CLOSE_COVARIANCE (   val,
  ref,
  tol 
)    BOOST_CHECK(Acts::Test::checkCloseCovariance((val), (ref), (tol)))

Definition at line 54 of file FloatComparisons.hpp.

View newest version in sPHENIX GitHub at line 54 of file FloatComparisons.hpp

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), and checkCovarianceConsistency().

#define CHECK_CLOSE_OR_SMALL (   val,
  ref,
  reltol,
  small 
)    BOOST_CHECK(Acts::Test::checkCloseOrSmall((val), (ref), (reltol), (small)))
#define CHECK_CLOSE_REL (   val,
  ref,
  reltol 
)    BOOST_CHECK(Acts::Test::checkCloseRel((val), (ref), (reltol)))
#define CHECK_SMALL (   val,
  small 
)    BOOST_CHECK(Acts::Test::checkSmall((val), (small)))