|
| template<typename Mtype , std::enable_if_t< Mtype::is_matrix(), int > = 0> |
| auto | abs (const Mtype &arg) |
| | Return absolute value Matrix or Vector.
|
| |
| template<typename Mtype , std::enable_if_t< Mtype::is_matrix(), int > = 0> |
| auto | adjoint (const Mtype &arg) |
| | Return adjoint Matrix.
|
| |
| template<int n, int m, typename T , typename MT , typename atype = hila::arithmetic_type<T>> |
| Matrix_t< n, m, T, MT > | altexp (const Matrix_t< n, m, T, MT > &mat) |
| | Calculate exp of a square matrix.
|
| |
| template<int n, int m, typename T , typename MT , typename atype = hila::arithmetic_type<T>> |
| Matrix_t< n, m, T, MT > | altexp (const Matrix_t< n, m, T, MT > &mat, int &niter) |
| | Calculate exp of a square matrix.
|
| |
| template<typename Ntype , typename T , int n, int m, std::enable_if_t< hila::is_arithmetic_or_extended< T >::value, int > = 0> |
| Matrix< n, m, Ntype > | hila::cast_to (const Matrix< n, m, T > &mat) |
| | Change basic number type of Matrix/Vector.
|
| |
| template<int n, int m, typename T , typename MT , typename Mt , std::enable_if_t< Mt::is_matrix() &&Mt::is_square() &&Mt::rows()==n, int > = 0> |
| void | chexp (const Matrix_t< n, m, T, MT > &mat, Matrix_t< n, m, T, MT > &omat, Mt(&domat)[n][m]) |
| | Calculate exp and dexp of a square matrix.
|
| |
| template<int n, int m, typename T , typename MT , typename Mt , std::enable_if_t< Mt::is_matrix() &&Mt::is_square() &&Mt::rows()==n, int > = 0> |
| int | chexp (const Matrix_t< n, m, T, MT > &mat, Matrix_t< n, m, T, MT > &omat, Mt(&pl)[n]) |
| | Calculate exp of a square matrix.
|
| |
| template<int n, int m, typename T , typename MT > |
| void | chexpk (const Matrix_t< n, m, T, MT > &mat, Matrix_t< n, m, T, MT > &omat, Matrix_t< n, m, T, MT > &kmats) |
| | Calculate exp(mat) and the decomposition k_{i,j} of dexp in terms bilinears of powers of mat.
|
| |
| template<int n, int m, typename T , typename MT > |
| Matrix_t< n, m, T, MT > | chsexp (const Matrix_t< n, m, T, MT > &mat) |
| | Calculate exp of a square matrix.
|
| |
| template<typename Mtype , std::enable_if_t< Mtype::is_matrix(), int > = 0> |
| auto | conj (const Mtype &arg) |
| | Return conjugate Matrix or Vector.
|
| |
| template<typename Mtype , std::enable_if_t< Mtype::is_matrix(), int > = 0> |
| auto | dagger (const Mtype &arg) |
| | Return dagger of Matrix.
|
| |
| template<typename Mtype , std::enable_if_t< Mtype::is_matrix(), int > = 0> |
| auto | imag (const Mtype &arg) |
| | Return imaginary of Matrix or Vector.
|
| |
| template<typename Mtype1 , typename Mtype2 , std::enable_if_t< Mtype1::is_matrix() &&Mtype2::is_matrix(), int > = 0> |
| auto | mul_trace (const Mtype1 &a, const Mtype2 &b) |
| | Returns trace of product of two matrices.
|
| |
| template<typename Mt1 , typename Mt2 , typename Mt3 , std::enable_if_t< Mt1::is_matrix() &&Mt2::is_matrix() &&Mt3::is_matrix(), int > = 0> |
| void | mult (const Mt1 &a, const Mt2 &b, Mt3 &res) |
| | compute product of two matrices and write result to existing matrix
|
| |
| template<typename Mt1 , typename S , typename Mt2 , std::enable_if_t<(Mt1::is_matrix() &&Mt2::is_matrix() &&hila::is_complex_or_arithmetic< S >::value), int > = 0> |
| void | mult (const Mt1 &a, const S &b, Mt2 &res) |
| | compute product of a matrix and a scalar and write result to existing matrix
|
| |
| template<typename S , typename Mt1 , typename Mt2 , std::enable_if_t<(Mt1::is_matrix() &&Mt2::is_matrix() &&hila::is_complex_or_arithmetic< S >::value), int > = 0> |
| void | mult (const S &a, const Mt1 &b, Mt2 &res) |
| | compute product of a scalar and a matrix and write result to existing matrix
|
| |
| template<typename Mt1 , typename Mt2 , typename Mt3 , std::enable_if_t< Mt1::is_matrix() &&Mt2::is_matrix() &&Mt3::is_matrix(), int > = 0> |
| void | mult_aa (const Mt1 &a, const Mt2 &b, Mt3 &res) |
| | compute hermitian conjugate of product of two matrices and write result to existing matrix
|
| |
| template<typename Mt1 , typename Mt2 , typename Mt3 , std::enable_if_t< Mt1::is_matrix() &&Mt2::is_matrix() &&Mt3::is_matrix(), int > = 0> |
| void | mult_add (const Mt1 &a, const Mt2 &b, Mt3 &res) |
| | compute product of two matrices and add result to existing matrix
|
| |
| template<typename Mt1 , typename S , typename Mt2 , std::enable_if_t<(Mt1::is_matrix() &&Mt2::is_matrix() &&hila::is_complex_or_arithmetic< S >::value), int > = 0> |
| void | mult_add (const Mt1 &a, const S &b, Mt2 &res) |
| | compute product of a matrix and a scalar and add result to existing matrix
|
| |
| template<typename S , typename Mt1 , typename Mt2 , std::enable_if_t<(Mt1::is_matrix() &&Mt2::is_matrix() &&hila::is_complex_or_arithmetic< S >::value), int > = 0> |
| void | mult_add (const S &a, const Mt1 &b, Mt2 &res) |
| | compute product of a scalar and a matrix and add result to existing matrix
|
| |
| template<int n, int m, typename T , typename MT > |
| void | mult_chexp (const Matrix_t< n, m, T, MT > &mat, const Matrix_t< n, m, T, MT > &mmat, Matrix_t< n, m, T, MT > &omat, Matrix_t< n, m, T, MT > &domat) |
| | Calculate exp(mat).dagger()*mmat*exp(mat) and trace(exp(mat).dagger*mmat*dexp(mat))
|
| |
| template<int n, int m, typename T , typename MT > |
| void | mult_chexpk_fast (const Matrix_t< n, m, T, MT > &mat, const Matrix_t< n, m, T, MT > &texp, const Matrix_t< n, m, T, MT > &kmats, const Matrix_t< n, m, T, MT > &mmat, Matrix_t< n, m, T, MT > &omat, Matrix_t< n, m, T, MT > &domat) |
| | Calculate exp(mat).dagger()*mmat*exp(mat) and trace(exp(mat).dagger*mmat*dexp(mat)) from output of chexpk.
|
| |
| template<int n, int m, typename T , typename MT > |
| void | mult_exp (const Matrix_t< n, m, T, MT > &mat, const Matrix_t< n, m, T, MT > &mmat, Matrix_t< n, m, T, MT > &r, Matrix_t< n, m, T, MT > &dr, const int order=20) |
| | Calculate mmat*exp(mat) and trace(mmat*dexp(mat))
|
| |
| template<typename Mt1 , typename Mt2 , typename Mt3 , std::enable_if_t< Mt1::is_matrix() &&Mt2::is_matrix() &&Mt3::is_matrix(), int > = 0> |
| void | mult_sub (const Mt1 &a, const Mt2 &b, Mt3 &res) |
| | compute product of two matrices and subtract result from existing matrix
|
| |
| template<typename Mt1 , typename S , typename Mt2 , std::enable_if_t<(Mt1::is_matrix() &&Mt2::is_matrix() &&hila::is_complex_or_arithmetic< S >::value), int > = 0> |
| void | mult_sub (const Mt1 &a, const S &b, Mt2 &res) |
| | compute product of a matrix and a scalar and subtract result from existing matrix
|
| |
| template<typename S , typename Mt1 , typename Mt2 , std::enable_if_t<(Mt1::is_matrix() &&Mt2::is_matrix() &&hila::is_complex_or_arithmetic< S >::value), int > = 0> |
| void | mult_sub (const S &a, const Mt1 &b, Mt2 &res) |
| | compute product of a scalar and a matrix and subtract result from existing matrix
|
| |
| template<typename Mt , std::enable_if_t< Mt::is_matrix(), int > = 0> |
| auto | norm (const Mt &rhs) |
| | Returns vector norm of Matrix.
|
| |
|
template<typename Mt , std::enable_if_t< Mt::is_matrix() &&Mt::rows()==Mt::columns(), int > = 0> |
| Mt | operator* (const Mt &a, const Mt &b) |
| | Multiplication operator Square Matrix * Square Matrix.
|
| |
|
template<typename Mtype1 , typename Mtype2 , std::enable_if_t< Mtype1::is_matrix() &&Mtype2::is_matrix(), int > = 0, typename Rtype = hila::mat_x_mat_type<Mtype1, Mtype2>, std::enable_if_t< std::is_same< Mtype1, Rtype >::value, int > = 0> |
| Rtype | operator+ (Mtype1 a, const Mtype2 &b) |
| | Real micro-optimization Matrix + Matrix - no extra creation of variable and copy.
|
| |
| template<int n, int m, typename T , typename MT > |
| std::string | hila::prettyprint (const Matrix_t< n, m, T, MT > &A, int prec=8) |
| | Formats Matrix_t object in a human readable way.
|
| |
| template<typename Mtype , std::enable_if_t< Mtype::is_matrix(), int > = 0> |
| auto | real (const Mtype &arg) |
| | Return real of Matrix or Vector.
|
| |
| template<typename Mt , std::enable_if_t< Mt::is_matrix(), int > = 0> |
| auto | squarenorm (const Mt &rhs) |
| | Returns square norm of Matrix.
|
| |
| template<int n, int m, typename T , typename MT > |
| std::string | hila::to_string (const Matrix_t< n, m, T, MT > &A, int prec=8, char separator=' ') |
| | Converts Matrix_t object to string.
|
| |
| template<typename Mtype , std::enable_if_t< Mtype::is_matrix(), int > = 0> |
| auto | trace (const Mtype &arg) |
| | Return trace of square Matrix.
|
| |
| template<typename Mtype , std::enable_if_t< Mtype::is_matrix(), int > = 0> |
| auto | transpose (const Mtype &arg) |
| | Return transposed Matrix or Vector.
|
| |