Go to the documentation of this file. 1 #ifndef _GLUCAT_MATRIX_H
2 #define _GLUCAT_MATRIX_H
35 #include <boost/numeric/ublas/fwd.hpp>
41 namespace ublas = boost::numeric::ublas;
46 template<
typename LHS_T,
typename RHS_T >
49 kron(
const LHS_T& lhs,
const RHS_T& rhs);
52 template<
typename LHS_T,
typename RHS_T >
55 mono_kron(
const LHS_T& lhs,
const RHS_T& rhs);
58 template<
typename LHS_T,
typename RHS_T >
61 nork(
const LHS_T& lhs,
const RHS_T& rhs,
const bool mono =
true);
64 template<
typename LHS_T,
typename RHS_T >
70 template<
typename Matrix_T >
71 typename Matrix_T::size_type
72 nnz(
const Matrix_T& m);
75 template<
typename Matrix_T >
77 isnan(
const Matrix_T& m);
80 template<
typename Matrix_T >
83 unit(
const typename Matrix_T::size_type n);
86 template<
typename LHS_T,
typename RHS_T >
88 typename RHS_T::expression_type
89 mono_prod(
const ublas::matrix_expression<LHS_T>& lhs,
90 const ublas::matrix_expression<RHS_T>& rhs);
93 template<
typename LHS_T,
typename RHS_T >
95 typename RHS_T::expression_type
96 sparse_prod(
const ublas::matrix_expression<LHS_T>& lhs,
97 const ublas::matrix_expression<RHS_T>& rhs);
100 template<
typename LHS_T,
typename RHS_T >
102 typename RHS_T::expression_type
103 prod(
const ublas::matrix_expression<LHS_T>& lhs,
104 const ublas::matrix_expression<RHS_T>& rhs);
107 template<
typename Scalar_T,
typename LHS_T,
typename RHS_T >
109 inner(
const LHS_T& lhs,
const RHS_T& rhs);
112 template<
typename Matrix_T >
113 typename Matrix_T::value_type
117 template<
typename Matrix_T >
118 typename Matrix_T::value_type
119 trace(
const Matrix_T& val);
122 template<
typename Matrix_T >
123 ublas::vector< std::complex<double> >
130 template<
typename Matrix_T >
133 typedef typename Matrix_T::value_type
Scalar_T;
141 template<
typename Matrix_T >
147 #endif // _GLUCAT_MATRIX_H
Matrix_T::value_type Scalar_T
Matrix_T::value_type norm_frob2(const Matrix_T &val)
Square of Frobenius norm.
const RHS_T mono_kron(const LHS_T &lhs, const RHS_T &rhs)
Sparse Kronecker tensor product of monomial matrices.
eig_case_t
Classification of eigenvalues of a matrix.
bool isnan(const Matrix_T &m)
Not a Number.
Matrix_T::value_type trace(const Matrix_T &val)
Matrix trace.
const Matrix_T unit(const typename Matrix_T::size_type n)
Unit matrix - as per Matlab eye.
const RHS_T::expression_type sparse_prod(const ublas::matrix_expression< LHS_T > &lhs, const ublas::matrix_expression< RHS_T > &rhs)
Product of sparse matrices.
eig_case_t m_eig_case
What kind of eigenvalues does the matrix contain?
const RHS_T::expression_type mono_prod(const ublas::matrix_expression< LHS_T > &lhs, const ublas::matrix_expression< RHS_T > &rhs)
Product of monomial matrices.
const RHS_T kron(const LHS_T &lhs, const RHS_T &rhs)
Kronecker tensor product of matrices - as per Matlab kron.
Matrix_T::size_type nnz(const Matrix_T &m)
Number of non-zeros.
Scalar_T m_safe_arg
Argument such that exp(pi-m_safe_arg) lies between arguments of eigenvalues.
const RHS_T signed_perm_nork(const LHS_T &lhs, const RHS_T &rhs)
Left inverse of Kronecker product where lhs is a signed permutation matrix.
Scalar_T inner(const LHS_T &lhs, const RHS_T &rhs)
Inner product: sum(x(i,j)*y(i,j))/x.nrows()
ublas::vector< std::complex< double > > eigenvalues(const Matrix_T &val)
Eigenvalues of a matrix.
const RHS_T nork(const LHS_T &lhs, const RHS_T &rhs, const bool mono=true)
Left inverse of Kronecker product.
eig_genus< Matrix_T > classify_eigenvalues(const Matrix_T &val)
Classify the eigenvalues of a matrix.
const RHS_T::expression_type prod(const ublas::matrix_expression< LHS_T > &lhs, const ublas::matrix_expression< RHS_T > &rhs)
Product of matrices.