NumCpp
2.4.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 "
NumCpp/Core/Internal/StaticAsserts.hpp
"
31
#include "
NumCpp/Core/Internal/TypeTraits.hpp
"
32
33
#include "boost/type_traits/is_complex.hpp"
34
35
#include <cmath>
36
#include <complex>
37
38
namespace
nc
39
{
40
namespace
utils
41
{
42
//============================================================================
50
template
<
typename
dtype1,
typename
dtype2>
51
auto
powerf
(dtype1 inValue,
const
dtype2 inPower) noexcept
52
{
53
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
(dtype1);
54
55
return
std::pow(inValue, inPower);
56
}
57
}
// namespace utils
58
}
// namespace nc
StaticAsserts.hpp
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition:
StaticAsserts.hpp:50
nc
Definition:
Coordinate.hpp:44
TypeTraits.hpp
nc::utils::powerf
auto powerf(dtype1 inValue, const dtype2 inPower) noexcept
Definition:
Utils/powerf.hpp:51
include
NumCpp
Utils
powerf.hpp
Generated by
1.8.17