cMHN 1.1
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
pow.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_COMPLEX_FUNCTIONS_POW_H
4#define pRC_CORE_COMPLEX_FUNCTIONS_POW_H
5
9
10namespace pRC
11{
12 template<class X, class Y>
13 static inline constexpr auto pow(Complex<X> const &x, Complex<Y> const &y)
14 {
15 return exp(y * log(x));
16 }
17
18 template<class X, class Y, If<IsValue<Y>> = 0>
19 static inline constexpr auto pow(Complex<X> const &x, Y const &y)
20 {
21 return exp(y * log(x));
22 }
23
24 template<class X, class Y, If<IsValue<X>> = 0>
25 static inline constexpr auto pow(X const &x, Complex<Y> const &y)
26 {
27 return exp(y * log(x));
28 }
29}
30#endif // pRC_CORE_COMPLEX_FUNCTIONS_POW_H
Definition complex.hpp:26
Definition cholesky.hpp:18
static constexpr auto makeConstantSequence()
Definition sequence.hpp:402
static constexpr auto exp(Complex< T > const &a)
Definition exp.hpp:12
static constexpr auto pow(Complex< X > const &x, Complex< Y > const &y)
Definition pow.hpp:13
static constexpr auto log(Complex< T > const &a)
Definition log.hpp:11