NumCpp
2.14.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Variables
a
c
d
e
g
h
i
j
m
n
o
p
s
t
v
Typedefs
Enumerations
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
c
d
e
i
l
m
n
p
r
s
t
v
x
y
z
Typedefs
a
c
d
i
p
r
s
t
v
Enumerations
Related Symbols
Files
File List
Globals
All
Macros
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
fmin.hpp
Go to the documentation of this file.
1
28
#pragma once
29
30
#include <cmath>
31
#include <complex>
32
#include <string>
33
34
#include "
NumCpp/Core/Internal/Error.hpp
"
35
#include "
NumCpp/Core/Internal/StaticAsserts.hpp
"
36
#include "
NumCpp/Core/Internal/StlAlgorithms.hpp
"
37
#include "
NumCpp/NdArray.hpp
"
38
#include "
NumCpp/NdArray/NdArrayBroadcast.hpp
"
39
40
namespace
nc
41
{
42
//============================================================================
43
// Method Description:
55
template
<
typename
dtype>
56
dtype
fmin
(
dtype
inValue1
,
dtype
inValue2
)
noexcept
57
{
58
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
(
dtype
);
59
60
return
std::min(
inValue1
,
61
inValue2
,
62
[](
const
dtype
value1
,
const
dtype
value2
)
noexcept
->
bool
{
return
value1
<
value2
; });
63
}
56
dtype
fmin
(
dtype
inValue1
,
dtype
inValue2
)
noexcept
{
…
}
64
65
//============================================================================
66
// Method Description:
78
template
<
typename
dtype>
79
NdArray<dtype>
fmin
(
const
NdArray<dtype>
&
inArray1
,
const
NdArray<dtype>
&
inArray2
)
80
{
81
return
broadcast::broadcaster<dtype>(
inArray1
,
82
inArray2
,
83
[](
dtype
inValue1
,
dtype
inValue2
)
noexcept
->
dtype
84
{
return
fmin
(
inValue1
,
inValue2
); });
85
}
79
NdArray<dtype>
fmin
(
const
NdArray<dtype>
&
inArray1
,
const
NdArray<dtype>
&
inArray2
) {
…
}
86
87
//============================================================================
88
// Method Description:
101
template
<
typename
dtype>
102
NdArray<dtype>
fmin
(
const
NdArray<dtype>
&
inArray
,
const
dtype
&
inScalar
)
103
{
104
const
NdArray<dtype>
inArray2
= {
inScalar
};
105
return
fmin
(
inArray
,
inArray2
);
106
}
102
NdArray<dtype>
fmin
(
const
NdArray<dtype>
&
inArray
,
const
dtype
&
inScalar
) {
…
}
107
108
//============================================================================
109
// Method Description:
122
template
<
typename
dtype>
123
NdArray<dtype>
fmin
(
const
dtype
&
inScalar
,
const
NdArray<dtype>
&
inArray
)
124
{
125
return
fmin
(
inArray
,
inScalar
);
126
}
123
NdArray<dtype>
fmin
(
const
dtype
&
inScalar
,
const
NdArray<dtype>
&
inArray
) {
…
}
127
}
// namespace nc
Error.hpp
NdArray.hpp
NdArrayBroadcast.hpp
StaticAsserts.hpp
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition
StaticAsserts.hpp:56
StlAlgorithms.hpp
nc::NdArray
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition
NdArrayCore.hpp:139
nc
Definition
Cartesian.hpp:40
nc::fmin
dtype fmin(dtype inValue1, dtype inValue2) noexcept
Definition
fmin.hpp:56
nc::arange
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition
arange.hpp:59
include
NumCpp
Functions
fmin.hpp
Generated by
1.9.8