5#include "plumbing/random.h"
11template <typename T, std::enable_if_t<std::is_floating_point<T>::value,
int> = 0>
17template <typename T, std::enable_if_t<std::is_arithmetic<T>::value,
int> = 0>
18inline T min(T val1, T val2) {
19 return std::min(val1, val2);
23template <typename T, std::enable_if_t<std::is_arithmetic<T>::value,
int> = 0>
24inline T max(T val1, T val2) {
25 return std::max(val1, val2);
29template <typename T, std::enable_if_t<hila::is_arithmetic<T>::value,
int> = 0>
34template <typename T, std::enable_if_t<hila::is_arithmetic<T>::value,
int> = 0>
39template <typename T, std::enable_if_t<hila::is_arithmetic<T>::value,
int> = 0>
44template <typename T, std::enable_if_t<hila::is_arithmetic<T>::value,
int> = 0>
50template <typename T, std::enable_if_t<hila::is_arithmetic<T>::value,
int> = 0>
56template <typename T, std::enable_if_t<hila::is_arithmetic<T>::value,
int> = 0>
57inline auto norm(T val) {
58 return sqrt(val * val);
66template <typename T, std::enable_if_t<hila::is_arithmetic<T>::value,
int> = 0>
67std::string
to_string(
const T v,
int prec = 8,
char separator =
' ') {
74template <typename T, std::enable_if_t<hila::is_arithmetic<T>::value,
int> = 0>
75std::string prettyprint(
const T v,
int prec = 8) {
Array< n, m, T > conj(const Array< n, m, T > &arg)
Return conjugate Array.
Array< n, m, hila::arithmetic_type< T > > imag(const Array< n, m, T > &arg)
Return imaginary part of Array.
hila::arithmetic_type< T > squarenorm(const Array< n, m, T > &rhs)
Return square norm of Array.
Array< n, m, T > sqrt(Array< n, m, T > a)
Square root.
Array< n, m, hila::arithmetic_type< T > > real(const Array< n, m, T > &arg)
Return real part of Array.
Complex< T > dagger(const Complex< T > &val)
Return dagger of Complex number.
T abs(const Complex< T > &a)
Return absolute value of Complex number.
This file defines all includes for HILA.
Implement hila::swap for gauge fields.
std::string to_string(const Array< n, m, T > &A, int prec=8, char separator=' ')
Converts Array object to string.