13#ifndef dealii_base_floating_point_copmerator_h
14#define dealii_base_floating_point_copmerator_h
41template <
typename Number>
45 typename ::internal::VectorizedArrayTrait<Number>::value_type;
46 static constexpr std::size_t
width =
67 const std::bitset<width> &
mask = std::bitset<width>().flip());
81 operator()(
const T &object1,
const T &object2)
const;
90 compare(
const std::vector<T> &v1,
const std::vector<T> &v2)
const;
95 template <std::
size_t dim,
typename T>
97 compare(
const std::array<T, dim> &t1,
const std::array<T, dim> &t2)
const;
102 template <
int rank,
int dim,
typename T>
109 template <
int rank,
int dim,
int spacedim,
typename T>
117 template <
typename T>
144template <
typename Number>
148 const std::bitset<width> &
mask)
158template <
typename Number>
162 const T &object2)
const
169template <
typename Number>
173 const std::vector<T> &v2)
const
175 const unsigned int s1 = v1.size(), s2 = v2.size();
181 for (
unsigned int i = 0; i < s1; ++i)
192template <
typename Number>
193template <std::
size_t dim,
typename T>
196 const std::array<T, dim> &t2)
const
198 for (
unsigned int i = 0; i < t1.size(); ++i)
209template <
typename Number>
210template <
int rank,
int dim,
typename T>
215 for (
unsigned int i = 0; i < dim; ++i)
226template <
typename Number>
227template <
int rank,
int dim,
int spacedim,
typename T>
233 for (
unsigned int i = 0; i < spacedim; ++i)
244template <
typename Number>
253 for (
unsigned int i = 0; i < t1.size(0); ++i)
254 for (
unsigned int j = 0; j < t1.size(1); ++j)
265template <
typename Number>
286template <
typename Number>
292 for (
unsigned int i = 0; i <
width; ++i)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
static ::ExceptionBase & ExcMessage(std::string arg1)
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)
typename ::internal::VectorizedArrayTrait< Number >::value_type ScalarNumber
bool operator()(const T &object1, const T &object2) const
FloatingPointComparator(const FloatingPointComparator &rhs)=default
const std::bitset< width > mask
FloatingPointComparator(FloatingPointComparator &&rhs) noexcept=default
const ScalarNumber tolerance
static constexpr std::size_t width
const bool use_absolute_tolerance
ComparisonResult compare(const std::vector< T > &v1, const std::vector< T > &v2) const
FloatingPointComparator(const ScalarNumber tolerance, const bool use_absolute_tolerance=true, const std::bitset< width > &mask=std::bitset< width >().flip())
static constexpr std::size_t width()