Tomographer
v3.0
Tomographer C++ Framework Documentation
|
Read a positive semidefinite matrix along with its matrix square root. More...
#include <tomographer/tools/ezmatio.h>
Classes | |
struct | Params |
Parameters to read the positive semidefinite matrix. More... | |
Public Types | |
typedef EigenType_ | EigenType |
typedef Eigen::NumTraits< typename EigenType::Scalar >::Real | RealScalarType |
Public Attributes | |
Eigen::SelfAdjointEigenSolver< EigenType > | eig |
The readily-initialized eigenvalue decomposition of the matrix read from the MAT file. | |
EigenType | mat |
The matrix itself. | |
EigenType | sqrt |
The matrix square root of the read matrix. | |
Friends | |
class | VarValueDecoder< EigenPosSemidefMatrixWithSqrt< EigenType > > |
Read a positive semidefinite matrix along with its matrix square root.
Use this type for VarValueDecoder<T> to decode a positive semidefinite matrix from a given variable, make sure that it is indeed numerically positive semidefinite, and calculate as well its matrix square root.
We read a square matrix, calculate its eigenvalue decomposition, and re-create a new matix with the same eigenvectors, where all eigenvalues are at least a given tolerance (the other eigenvalues are adjusted so as to perserve the overall trace). Internally, we use the Tomographer::MathTools::forcePosSemiDef() family of utilities (preserving the total trace of the matrix).
You should not construct this type directly, just use it with VarValueDecoder<EigenPosSmidefMatrixWithSqrt<EigenType> >.