glucat 0.13.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_blaze (const Matrix_T &val) -> blaze::DynamicMatrix< double, blaze::rowMajor > |
Convert matrix to Blaze format. | |
auto glucat::matrix::classify_eigenvalues | ( | const Matrix_T & | val | ) | -> eig_genus<Matrix_T> |
Classify the eigenvalues of a matrix.
Definition at line 492 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, glucat::numeric_traits< Scalar_T >::pi(), and glucat::numeric_traits< Scalar_T >::to_double().
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 464 of file matrix_imp.h.
References to_blaze().
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 368 of file matrix_imp.h.
auto glucat::matrix::isinf | ( | const Matrix_T & | m | ) | -> bool |
Infinite.
Definition at line 270 of file matrix_imp.h.
References glucat::numeric_traits< Scalar_T >::isInf().
auto glucat::matrix::isnan | ( | const Matrix_T & | m | ) | -> bool |
Not a Number.
Definition at line 287 of file matrix_imp.h.
References glucat::numeric_traits< Scalar_T >::isNaN().
Referenced by glucat::operator/().
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 78 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 114 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 315 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 253 of file matrix_imp.h.
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 177 of file matrix_imp.h.
References nork_range(), and 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 147 of file matrix_imp.h.
References glucat::numeric_traits< Scalar_T >::to_scalar_t().
Referenced by nork(), and signed_perm_nork().
auto glucat::matrix::norm_frob2 | ( | const Matrix_T & | val | ) | -> typename Matrix_T::value_type |
Square of Frobenius norm.
Definition at line 390 of file matrix_imp.h.
References glucat::numeric_traits< Scalar_T >::isNaN(), and glucat::numeric_traits< Scalar_T >::NaN().
Referenced by nork().
|
inline |
Product of matrices.
Definition at line 356 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 223 of file matrix_imp.h.
References nork_range().
Referenced by glucat::fast().
|
inline |
Product of sparse matrices.
Definition at line 345 of file matrix_imp.h.
|
static |
Convert matrix to Blaze format.
Definition at line 435 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 411 of file matrix_imp.h.
References glucat::numeric_traits< Scalar_T >::isNaN(), and glucat::numeric_traits< Scalar_T >::NaN().
|
inline |
Unit matrix - as per Matlab eye.
Definition at line 305 of file matrix_imp.h.
Referenced by glucat::matrix_multi< Scalar_T, LO, HI, Tune_P >::basis_element(), glucat::fast(), glucat::framed_multi< Scalar_T, LO, HI, Tune_P >::fast(), glucat::gen::generator_table< Matrix_T >::gen_from_pm1_qm1(), and glucat::gen::generator_table< Matrix_T >::gen_vector().