NumCpp
2.9.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
Utils/powerf.hpp
Go to the documentation of this file.
1
#pragma once
29
30
#include <cmath>
31
#include <complex>
32
33
#include "
NumCpp/Core/Internal/StaticAsserts.hpp
"
34
#include "
NumCpp/Core/Internal/TypeTraits.hpp
"
35
36
namespace
nc
37
{
38
namespace
utils
39
{
40
//============================================================================
48
template
<
typename
dtype1,
typename
dtype2>
49
auto
powerf
(dtype1 inValue,
const
dtype2 inPower) noexcept
50
{
51
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
(dtype1);
52
53
return
std::pow(inValue, inPower);
54
}
55
}
// namespace utils
56
}
// namespace nc
StaticAsserts.hpp
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition:
StaticAsserts.hpp:49
TypeTraits.hpp
nc::utils::powerf
auto powerf(dtype1 inValue, const dtype2 inPower) noexcept
Definition:
Utils/powerf.hpp:49
nc
Definition:
Coordinate.hpp:45
include
NumCpp
Utils
powerf.hpp
Generated by
1.9.1