Template Function trv::array::check_isclose#
Defined in File arrayops.hpp
Function Documentation#
-
template<typename T>
bool trv::array::check_isclose(const std::vector<T> &arr, const T val, T atol = 1.e-8, T rtol = 1.e-5)# Check if all elements of a 1-d array are close to a given value.
- Template Parameters:
T – A
typename.- Parameters:
arr – 1-d array as a vector.
val – Value to check against.
atol – Absolute tolerance (default is 1.e-8).
rtol – Relative tolerance (default is 1.e-5).
- Returns:
{
true,false}