22 using argument_type = T;
27 U1(
const U1 &v) =
default;
30 inline U1(
const std::nullptr_t &z) {
37 res.phase = phase + M_PI;
49 std::enable_if_t<std::is_convertible<hila::type_plus<T, S>, T>::value,
int> = 0>
60 template <typename S, std::enable_if_t<hila::is_arithmetic<S>::value,
int> = 0>
61 U1 &set_phase(
const S val) out_only {
66 template <typename S, std::enable_if_t<hila::is_arithmetic<S>::value,
int> = 0>
72 inline U1 conj()
const {
78 inline U1 dagger()
const {
82 inline T real()
const {
86 inline T imag()
const {
97 U1 &gaussian_random(
double width=1.0) out_only {
128template <
typename T,
typename S>
136template <
typename T,
typename S>
154template <
typename Ntype,
typename T,
155 std::enable_if_t<hila::is_arithmetic<T>::value,
int> = 0>
Array< n, m, T > conj(const Array< n, m, T > &arg)
Return conjugate Array.
std::ostream & operator<<(std::ostream &strm, const Array< n, m, T > &A)
Stream operator.
Array< n, m, hila::arithmetic_type< T > > imag(const Array< n, m, T > &arg)
Return imaginary part of Array.
Array< n, m, T > cos(Array< n, m, T > a)
Cosine.
Array< n, m, T > operator*(Array< n, m, T > a, const Array< n, m, T > &b)
Multiplication operator.
Array< n, m, Ntype > cast_to(const Array< n, m, T > &mat)
Array casting operation.
Array< n, m, T > sin(Array< n, m, T > a)
Sine.
Array< n, m, hila::arithmetic_type< T > > real(const Array< n, m, T > &arg)
Return real part of Array.
U1 & random()
Generate random elements.
U1< T > & operator*=(const U1< S > &rhs)
multiply assign
U1()=default
define default constructors to ensure std::is_trivial
U1 operator-() const
unary -
hila::arithmetic_type< T > base_type
std incantation for field types
Complex< T > complex() const
U1 -> complex number.
U1 operator+() const
unary +
Definition of Complex types.
T arg(const Complex< T > &a)
Return argument of Complex number.
This file defines all includes for HILA.
double random()
Real valued uniform random number generator.
double gaussrand()
Gaussian random generation routine.