glucat 0.12.0
|
Classes | |
struct | eig_genus |
Structure containing classification of eigenvalues. More... | |
Typedefs | |
using | eig_case_t |
Classification of eigenvalues of a matrix. | |
Functions | |
template<typename LHS_T , typename RHS_T > | |
auto | kron (const LHS_T &lhs, const RHS_T &rhs) -> const RHS_T |
Kronecker tensor product of matrices - as per Matlab kron. | |
template<typename LHS_T , typename RHS_T > | |
auto | mono_kron (const LHS_T &lhs, const RHS_T &rhs) -> const RHS_T |
Sparse Kronecker tensor product of monomial matrices. | |
template<typename LHS_T , typename RHS_T > | |
auto | nork (const LHS_T &lhs, const RHS_T &rhs, const bool mono=true) -> const RHS_T |
Left inverse of Kronecker product. | |
template<typename LHS_T , typename RHS_T > | |
auto | signed_perm_nork (const LHS_T &lhs, const RHS_T &rhs) -> const RHS_T |
Left inverse of Kronecker product where lhs is a signed permutation matrix. | |
template<typename Matrix_T > | |
auto | nnz (const Matrix_T &m) -> typename Matrix_T::size_type |
Number of non-zeros. | |
template<typename Matrix_T > | |
auto | isinf (const Matrix_T &m) -> bool |
Infinite. | |
template<typename Matrix_T > | |
auto | isnan (const Matrix_T &m) -> bool |
Not a Number. | |
template<typename Matrix_T > | |
auto | unit (const typename Matrix_T::size_type n) -> const Matrix_T |
Unit matrix - as per Matlab eye. | |
template<typename LHS_T , typename RHS_T > | |
auto | mono_prod (const ublas::matrix_expression< LHS_T > &lhs, const ublas::matrix_expression< RHS_T > &rhs) -> const typename RHS_T::expression_type |
Product of monomial matrices. | |
template<typename LHS_T , typename RHS_T > | |
auto | sparse_prod (const ublas::matrix_expression< LHS_T > &lhs, const ublas::matrix_expression< RHS_T > &rhs) -> const typename RHS_T::expression_type |
Product of sparse matrices. | |
template<typename LHS_T , typename RHS_T > | |
auto | prod (const ublas::matrix_expression< LHS_T > &lhs, const ublas::matrix_expression< RHS_T > &rhs) -> const typename RHS_T::expression_type |
Product of matrices. | |
template<typename Scalar_T , typename LHS_T , typename RHS_T > | |
auto | inner (const LHS_T &lhs, const RHS_T &rhs) -> Scalar_T |
Inner product: sum(x(i,j)*y(i,j))/x.nrows() | |
template<typename Matrix_T > | |
auto | norm_frob2 (const Matrix_T &val) -> typename Matrix_T::value_type |
Square of Frobenius norm. | |
template<typename Matrix_T > | |
auto | trace (const Matrix_T &val) -> typename Matrix_T::value_type |
Matrix trace. | |
template<typename Matrix_T > | |
auto | eigenvalues (const Matrix_T &val) -> std::vector< std::complex< double > > |
Eigenvalues of a matrix. | |
template<typename Matrix_T > | |
auto | classify_eigenvalues (const Matrix_T &val) -> eig_genus< Matrix_T > |
Classify the eigenvalues of a matrix. | |
template<typename LHS_T , typename RHS_T > | |
void | nork_range (RHS_T &result, const typename LHS_T::const_iterator2 lhs_it2, const RHS_T &rhs, const typename RHS_T::size_type res_s1, const typename RHS_T::size_type res_s2) |
Utility routine for nork: calculate result for a range of indices. | |
template<typename Matrix_T > | |
static auto | to_lapack (const Matrix_T &val) -> ublas::matrix< double, ublas::column_major > |
Convert matrix to LAPACK format. | |
auto glucat::matrix::classify_eigenvalues | ( | const Matrix_T & | val | ) | -> eig_genus<Matrix_T> |
Classify the eigenvalues of a matrix.
Definition at line 548 of file matrix_imp.h.
References eigenvalues(), epsilon, glucat::matrix::eig_genus< Matrix_T >::m_eig_case, glucat::matrix::eig_genus< Matrix_T >::m_is_singular, glucat::matrix::eig_genus< Matrix_T >::m_safe_arg, and glucat::numeric_traits< Scalar_T >::pi().
Referenced by glucat::matrix_log(), and glucat::matrix_sqrt().
auto glucat::matrix::eigenvalues | ( | const Matrix_T & | val | ) | -> std::vector< std::complex<double> > |
Eigenvalues of a matrix.
Definition at line 500 of file matrix_imp.h.
References to_lapack().
Referenced by classify_eigenvalues().
auto glucat::matrix::inner | ( | const LHS_T & | lhs, |
const RHS_T & | rhs ) -> Scalar_T |
Inner product: sum(x(i,j)*y(i,j))/x.nrows()
Inner product: sum(lhs(i,j)*rhs(i,j))/lhs.nrows()
Definition at line 373 of file matrix_imp.h.
auto glucat::matrix::isinf | ( | const Matrix_T & | m | ) | -> bool |
Infinite.
Definition at line 275 of file matrix_imp.h.
auto glucat::matrix::isnan | ( | const Matrix_T & | m | ) | -> bool |
auto glucat::matrix::kron | ( | const LHS_T & | lhs, |
const RHS_T & | rhs ) -> const RHS_T |
Kronecker tensor product of matrices - as per Matlab kron.
Definition at line 83 of file matrix_imp.h.
Referenced by glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::fast().
auto glucat::matrix::mono_kron | ( | const LHS_T & | lhs, |
const RHS_T & | rhs ) -> const RHS_T |
Sparse Kronecker tensor product of monomial matrices.
Definition at line 119 of file matrix_imp.h.
Referenced by glucat::gen::generator_table< Matrix_T >::gen_from_pm1_qm1().
auto glucat::matrix::mono_prod | ( | const ublas::matrix_expression< LHS_T > & | lhs, |
const ublas::matrix_expression< RHS_T > & | rhs ) -> const typename RHS_T::expression_type |
Product of monomial matrices.
Definition at line 320 of file matrix_imp.h.
Referenced by glucat::matrix_multi< Scalar_T, LO, HI, Tune_P >::basis_element(), glucat::gen::generator_table< Matrix_T >::gen_from_pm4_qp4(), glucat::gen::generator_table< Matrix_T >::gen_from_pp4_qm4(), and glucat::gen::generator_table< Matrix_T >::gen_from_qp1_pm1().
auto glucat::matrix::nnz | ( | const Matrix_T & | m | ) | -> typename Matrix_T::size_type |
Number of non-zeros.
Definition at line 258 of file matrix_imp.h.
Referenced by glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::framed_multi().
auto glucat::matrix::nork | ( | const LHS_T & | lhs, |
const RHS_T & | rhs, | ||
const bool | mono = true ) -> const RHS_T |
Left inverse of Kronecker product.
Definition at line 182 of file matrix_imp.h.
References norm_frob2().
void glucat::matrix::nork_range | ( | RHS_T & | result, |
const typename LHS_T::const_iterator2 | lhs_it2, | ||
const RHS_T & | rhs, | ||
const typename RHS_T::size_type | res_s1, | ||
const typename RHS_T::size_type | res_s2 ) |
Utility routine for nork: calculate result for a range of indices.
Definition at line 152 of file matrix_imp.h.
References glucat::numeric_traits< Scalar_T >::to_scalar_t().
auto glucat::matrix::norm_frob2 | ( | const Matrix_T & | val | ) | -> typename Matrix_T::value_type |
|
inline |
Product of matrices.
Definition at line 361 of file matrix_imp.h.
auto glucat::matrix::signed_perm_nork | ( | const LHS_T & | lhs, |
const RHS_T & | rhs ) -> const RHS_T |
Left inverse of Kronecker product where lhs is a signed permutation matrix.
Definition at line 228 of file matrix_imp.h.
Referenced by glucat::fast().
|
inline |
Product of sparse matrices.
Definition at line 350 of file matrix_imp.h.
|
static |
Convert matrix to LAPACK format.
Definition at line 440 of file matrix_imp.h.
Referenced by eigenvalues().
auto glucat::matrix::trace | ( | const Matrix_T & | val | ) | -> typename Matrix_T::value_type |
Matrix trace.
Definition at line 416 of file matrix_imp.h.
References glucat::numeric_traits< Scalar_T >::NaN().
|
inline |
Unit matrix - as per Matlab eye.
Definition at line 310 of file matrix_imp.h.