|
| static Eigen::VectorXd | combine_xyz (const Eigen::VectorXd &vec) |
| static double | getConditionNumber (const Eigen::MatrixXd &A, Eigen::VectorXd &s) |
| static double | getConditionSlope (const Eigen::MatrixXd &A, Eigen::VectorXd &s) |
| static void | get_whitener (Eigen::MatrixXd &A, bool pca, QString ch_type, Eigen::VectorXd &eig, Eigen::MatrixXd &eigvec) |
| static void | get_whitener (Eigen::MatrixXd &A, bool pca, const std::string &ch_type, Eigen::VectorXd &eig, Eigen::MatrixXd &eigvec) |
| static Eigen::VectorXi | intersect (const Eigen::VectorXi &v1, const Eigen::VectorXi &v2, Eigen::VectorXi &idx_sel) |
| static Eigen::SparseMatrix< double > | make_block_diag (const Eigen::MatrixXd &A, qint32 n) |
| template<typename T> |
| static Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > | pinv (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &a) |
| static qint32 | rank (const Eigen::MatrixXd &A, double tol=1e-8) |
| template<typename T> |
| static Eigen::VectorXi | sort (Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, bool desc=true) |
| template<typename T> |
| static Eigen::VectorXi | sort (Eigen::Matrix< T, Eigen::Dynamic, 1 > &v_prime, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &mat, bool desc=true) |
| template<typename T> |
| static std::vector< Eigen::Triplet< T > > | sortrows (const std::vector< Eigen::Triplet< T > > &A, qint32 column=0) |
| template<typename T> |
| static bool | compareIdxValuePairBiggerThan (const std::pair< int, T > &lhs, const std::pair< int, T > &rhs) |
| template<typename T> |
| static bool | compareIdxValuePairSmallerThan (const std::pair< int, T > &lhs, const std::pair< int, T > &rhs) |
| template<typename T> |
| static bool | compareTripletFirstEntry (const Eigen::Triplet< T > &lhs, const Eigen::Triplet< T > &rhs) |
| template<typename T> |
| static bool | compareTripletSecondEntry (const Eigen::Triplet< T > &lhs, const Eigen::Triplet< T > &rhs) |
Static linear algebra utility functions.
Linear algebra utility functions: decompositions, sorting, block-diagonal construction, etc.
Definition at line 74 of file linalg.h.
| SparseMatrix< double > Linalg::make_block_diag |
( |
const Eigen::MatrixXd & | A, |
|
|
qint32 | n ) |
|
static |
Make a sparse block diagonal matrix.
Returns a sparse block diagonal, diagonalized from the elements in "A". "A" is ma x na, comprising bdn=(na/"n") blocks of submatrices. Each submatrix is ma x "n", and these submatrices are placed down the diagonal of the matrix.
- Parameters
-
| [in] | A | Matrix which should be diagonalized. |
| [in] | n | Columns of the submatrices. |
- Returns
- A sparse block diagonal, diagonalized from the elements in "A".
Definition at line 205 of file linalg.cpp.