15#ifndef dealii_base_floating_point_copmerator_h
16#define dealii_base_floating_point_copmerator_h
43template <
typename Number>
47 typename ::internal::VectorizedArrayTrait<Number>::value_type;
48 static constexpr std::size_t
width =
69 const std::bitset<width> &
mask = std::bitset<width>().flip());
83 operator()(
const T &object1,
const T &object2)
const;
92 compare(
const std::vector<T> &v1,
const std::vector<T> &v2)
const;
97 template <std::
size_t dim,
typename T>
99 compare(
const std::array<T, dim> &t1,
const std::array<T, dim> &t2)
const;
104 template <
int rank,
int dim,
typename T>
111 template <
int rank,
int dim,
int spacedim,
typename T>
119 template <
typename T>
146template <
typename Number>
150 const std::bitset<width> &
mask)
160template <
typename Number>
164 const T &object2)
const
171template <
typename Number>
175 const std::vector<T> &v2)
const
177 const unsigned int s1 = v1.size(), s2 = v2.size();
183 for (
unsigned int i = 0; i < s1; ++i)
194template <
typename Number>
195template <std::
size_t dim,
typename T>
198 const std::array<T, dim> &t2)
const
200 for (
unsigned int i = 0; i < t1.size(); ++i)
211template <
typename Number>
212template <
int rank,
int dim,
typename T>
217 for (
unsigned int i = 0; i < dim; ++i)
228template <
typename Number>
229template <
int rank,
int dim,
int spacedim,
typename T>
235 for (
unsigned int i = 0; i < spacedim; ++i)
246template <
typename Number>
255 for (
unsigned int i = 0; i < t1.size(0); ++i)
256 for (
unsigned int j = 0; j < t1.size(1); ++j)
267template <
typename Number>
288template <
typename Number>
294 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 > &)
bool operator()(const T &object1, const T &object2) const
FloatingPointComparator(const FloatingPointComparator &rhs)=default
const std::bitset< width > mask
FloatingPointComparator(FloatingPointComparator &&rhs) noexcept=default
typename ::internal::VectorizedArrayTrait< Number >::value_type ScalarNumber
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()