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
fmax.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"
38
39namespace nc
40{
41 //============================================================================
42 // Method Description:
54 template<typename dtype>
56 {
58
59 return std::max(inValue1,
61 [](const dtype value1, const dtype value2) noexcept -> bool { return value1 < value2; });
62 }
63
64 //============================================================================
65 // Method Description:
77 template<typename dtype>
79 {
80 return broadcast::broadcaster<dtype>(inArray1,
82 [](dtype inValue1, dtype inValue2) noexcept -> dtype
83 { return fmax(inValue1, inValue2); });
84 }
85
86 //============================================================================
87 // Method Description:
100 template<typename dtype>
102 {
103 const NdArray<dtype> inArray2 = { inScalar };
104 return fmax(inArray, inArray2);
105 }
106
107 //============================================================================
108 // Method Description:
121 template<typename dtype>
123 {
124 return fmax(inArray, inScalar);
125 }
126} // 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
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition arange.hpp:59
dtype fmax(dtype inValue1, dtype inValue2) noexcept
Definition fmax.hpp:55