NumCpp
1.0
A C++ implementation of the Python Numpy library
Utils/powerf.hpp
Go to the documentation of this file.
1
#pragma once
30
31
#include "
NumCpp/Core/Internal/StaticAsserts.hpp
"
32
#include "
NumCpp/Core/Internal/TypeTraits.hpp
"
33
34
#include "boost/type_traits/is_complex.hpp"
35
36
#include <cmath>
37
#include <complex>
38
39
namespace
nc
40
{
41
namespace
utils
42
{
43
//============================================================================
51
template
<
typename
dtype1,
typename
dtype2>
52
auto
powerf
(dtype1 inValue,
const
dtype2 inPower) noexcept
53
{
54
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
(dtype1);
55
56
return
std::pow(inValue, inPower);
57
}
58
}
59
}
StaticAsserts.hpp
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition:
StaticAsserts.hpp:51
nc
Definition:
Coordinate.hpp:45
TypeTraits.hpp
nc::utils::powerf
auto powerf(dtype1 inValue, const dtype2 inPower) noexcept
Definition:
Utils/powerf.hpp:52
include
NumCpp
Utils
powerf.hpp
Generated by
1.8.17