NumCpp  2.14.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fmin.hpp
Go to the documentation of this file.
1
28#pragma once
29
30#include <cmath>
31#include <complex>
32#include <string>
33
37#include "NumCpp/NdArray.hpp"
39
40namespace nc
41{
42 //============================================================================
43 // Method Description:
55 template<typename dtype>
57 {
59
60 return std::min(inValue1,
62 [](const dtype value1, const dtype value2) noexcept -> bool { return value1 < value2; });
63 }
64
65 //============================================================================
66 // Method Description:
78 template<typename dtype>
80 {
81 return broadcast::broadcaster<dtype>(inArray1,
83 [](dtype inValue1, dtype inValue2) noexcept -> dtype
84 { return fmin(inValue1, inValue2); });
85 }
86
87 //============================================================================
88 // Method Description:
101 template<typename dtype>
103 {
104 const NdArray<dtype> inArray2 = { inScalar };
105 return fmin(inArray, inArray2);
106 }
107
108 //============================================================================
109 // Method Description:
122 template<typename dtype>
124 {
125 return fmin(inArray, inScalar);
126 }
127} // namespace nc
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition StaticAsserts.hpp:56
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition NdArrayCore.hpp:139
Definition Cartesian.hpp:40
dtype fmin(dtype inValue1, dtype inValue2) noexcept
Definition fmin.hpp:56
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition arange.hpp:59