NumCpp  2.13.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
Loading...
Searching...
No Matches
essentiallyEqual.hpp
Go to the documentation of this file.
1
28#pragma once
29
30#include <cmath>
31#include <complex>
32#include <string>
33
36
37namespace nc::utils
38{
39 //============================================================================
40 // Method Description:
50 {
51 return inValue1 == inValue2;
52 }
53
54 //============================================================================
55 // Method Description:
66 {
67 const auto absValue1 = std::abs(inValue1);
68 const auto absValue2 = std::abs(inValue2);
69 return std::abs(inValue1 - inValue2) <= ((absValue1 > absValue2 ? absValue2 : absValue1) * std::abs(inEpsilon));
70 }
71
72 //============================================================================
73 // Method Description:
83 {
85 }
86} // namespace nc::utils
Holds info about the dtype.
Definition DtypeInfo.hpp:41
Definition Utils/cube.hpp:33
bool essentiallyEqual(dtype inValue1, dtype inValue2) noexcept
Definition essentiallyEqual.hpp:49
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition arange.hpp:59