|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|

Go to the source code of this file.
Functions | |
| std::ostream & | operator<< (std::ostream &os, RealMatrix A) |
| RealMatrix | eye (std::size_t n) |
Returns the identity matrix of size n. | |
| RealMatrix | diag (const gsl_vector *X) |
| Builds a diagonal matrix from a GSL vector. | |
| RealMatrix | nearest_psd (RealMatrix R, double thr) |
| Projects a matrix to the nearest positive semi-definite correlation-like matrix. | |
| RealMatrix | cholesky_L (RealMatrix R) |
| Returns the lower-triangular Cholesky factor of a PSD matrix. | |
| RealMatrix | block_diag (const std::vector< RealMatrix > &blocks) |
| Builds a block-diagonal matrix from several square blocks. | |
| RealMatrix block_diag | ( | const std::vector< RealMatrix > & | blocks | ) |
Builds a block-diagonal matrix from several square blocks.
| blocks | List of square matrices. |
| std::invalid_argument | if one input block is not square. |
Definition at line 529 of file Matrix.cpp.
| RealMatrix cholesky_L | ( | RealMatrix | R | ) |
Returns the lower-triangular Cholesky factor of a PSD matrix.
If R = L L^T, this function returns L.
| R | Input matrix. |
| std::invalid_argument | if the matrix is not square. |
| std::runtime_error | if Cholesky decomposition fails. |
Definition at line 508 of file Matrix.cpp.
| RealMatrix diag | ( | const gsl_vector * | X | ) |
Builds a diagonal matrix from a GSL vector.
| X | Input vector. |
X. Definition at line 464 of file Matrix.cpp.
| RealMatrix eye | ( | std::size_t | n | ) |
Returns the identity matrix of size n.
| n | Matrix dimension. |
n × n identity matrix. Definition at line 453 of file Matrix.cpp.
| RealMatrix nearest_psd | ( | RealMatrix | R, |
| double | thr = 1e-12 |
||
| ) |
Projects a matrix to the nearest positive semi-definite correlation-like matrix.
Algorithm:
thr,This is especially useful for repairing numerically inconsistent correlation matrices.
| R | Input matrix. |
| thr | Lower bound applied to eigenvalues during clipping. |
| std::invalid_argument | if the matrix is not square. |
Definition at line 475 of file Matrix.cpp.
| std::ostream & operator<< | ( | std::ostream & | os, |
| RealMatrix | A | ||
| ) |
Prints the matrix in a nested bracket form.
| os | Output stream. |
| A | Matrix to print. |
Definition at line 439 of file Matrix.cpp.