|
CbmRoot
|
The class describes a symmetric N x N matrix stored in a low-triangular way. More...
#include <KfMatrixSym.h>
Public Member Functions | |
| MatrixSym () | |
| default constructor | |
| ~MatrixSym ()=default | |
| Default destructor. | |
| T | operator() (int i, int j) const |
| Get matrix element, indices can be runtime values. | |
| template<int i, int j> | |
| T | operator() (Tag< i, j >) const |
| Get matrix element, ensuring that indices are known at compile time. | |
| T & | operator() (int i, int j) |
| Get matrix element, indices can be runtime values. | |
| template<int i, int j> | |
| T & | operator() (Tag< i, j >) |
| Get matrix element, ensuring that indices are known at compile time. | |
| template<typename... Args> | |
| void | Reset (Args... args) |
| Resets to 0, diagonal elements to given values. | |
| std::string | ToString (int iv=-1) const |
| Prints parameters to a string. | |
| std::string | ToStringCorrelations (int iv=-1) const |
| Prints correlations to a string (assuming the matrix is a covariance matrix) | |
| bool | IsFinite () const |
| Checks whether some parameters are finite. | |
| bool | IsSimdEntryConsistent (int iv) const |
| Checks whether SIMD entry iv is consistent. | |
| bool | IsConsistent (int nSimdFilled=-1) const |
| Checks whether the covariance matrix elements are consistent. | |
| template<DoPrintDebug FlagPrintDebug = DoPrintDebug::Y> | |
| bool | IsFinite (std::stringstream *ss) const |
| Checks whether some parameters are finite. | |
| template<DoPrintDebug FlagPrintDebug = DoPrintDebug::Y> | |
| bool | IsSimdEntryConsistent (std::stringstream *ss, int iv) const |
| Checks whether SIMD entry iv is consistent. | |
| template<DoPrintDebug FlagPrintDebug = DoPrintDebug::Y> | |
| bool | IsConsistent (std::stringstream *ss, int nSimdFilled=-1) const |
| Checks whether the covariance matrix elements are consistent. | |
| template<class Archive> | |
| void | serialize (Archive &ar, const unsigned int) |
Static Public Attributes | |
| static constexpr int | kDimension {N} |
| matrix dimension | |
| static constexpr int | kNofElements {(N) * (N + 1) / 2} |
| N of matrix elements. | |
Private Member Functions | |
| template<int index, typename... Args> | |
| void | SetDiagonal (T val, Args... args) |
| Helper method to set diagonal elements recursively. | |
The class describes a symmetric N x N matrix stored in a low-triangular way.
that is used for covariance matrices.
Definition at line 36 of file KfMatrixSym.h.
|
inline |
default constructor
Definition at line 42 of file KfMatrixSym.h.
|
default |
Default destructor.
|
inline |
Checks whether the covariance matrix elements are consistent.
| nFilled | number of filled SIMD entries to check (if <0, all entries are checked) |
Definition at line 109 of file KfMatrixSym.h.
Referenced by cbm::algo::kf::MatrixSym< T, kNofParameters >::IsConsistent().
|
inline |
Checks whether the covariance matrix elements are consistent.
| printWhenWrong | if true, prints details when matrix is not consistent |
| nFilled | number of filled SIMD entries to check (if <0, all entries are checked) |
Definition at line 366 of file KfMatrixSym.h.
References IsSimdEntryConsistent(), cbm::algo::kf::fvec::size(), size(), ToString(), and cbm::algo::kf::Y.
|
inline |
Checks whether some parameters are finite.
Definition at line 102 of file KfMatrixSym.h.
Referenced by cbm::algo::kf::MatrixSym< T, kNofParameters >::IsFinite(), and IsSimdEntryConsistent().
|
inline |
Checks whether some parameters are finite.
Definition at line 255 of file KfMatrixSym.h.
References cbm::algo::kf::utils::IsFinite(), kDimension, operator()(), and cbm::algo::kf::Y.
|
inline |
Checks whether SIMD entry iv is consistent.
Definition at line 105 of file KfMatrixSym.h.
Referenced by IsConsistent(), and cbm::algo::kf::MatrixSym< T, kNofParameters >::IsSimdEntryConsistent().
|
inline |
Checks whether SIMD entry iv is consistent.
Definition at line 279 of file KfMatrixSym.h.
References cbm::algo::kf::utils::simd::GetSimdEntry(), IsFinite(), kDimension, sqrt(), ToString(), and cbm::algo::kf::Y.
|
inline |
Get matrix element, indices can be runtime values.
| i | row |
| j | column |
Definition at line 67 of file KfMatrixSym.h.
|
inline |
Get matrix element, indices can be runtime values.
| i | row |
| j | column |
Definition at line 51 of file KfMatrixSym.h.
Referenced by IsFinite(), ToString(), and ToStringCorrelations().
|
inline |
Get matrix element, ensuring that indices are known at compile time.
| i | row |
| j | column |
Definition at line 75 of file KfMatrixSym.h.
|
inline |
Get matrix element, ensuring that indices are known at compile time.
| i | row |
| j | column |
Definition at line 58 of file KfMatrixSym.h.
|
inline |
Resets to 0, diagonal elements to given values.
Other methods
Definition at line 85 of file KfMatrixSym.h.
|
inline |
|
inlineprivate |
Helper method to set diagonal elements recursively.
Definition at line 138 of file KfMatrixSym.h.
Referenced by cbm::algo::kf::MatrixSym< T, kNofParameters >::Reset(), and cbm::algo::kf::MatrixSym< T, kNofParameters >::SetDiagonal().
|
inline |
Prints parameters to a string.
| iv | if >=0, prints only the iv-th elements of SIMD vectors |
Implementation of inline methods for MatrixSym class
Definition at line 168 of file KfMatrixSym.h.
References kDimension, operator()(), and ToString().
|
inline |
Prints correlations to a string (assuming the matrix is a covariance matrix)
| iv | if >=0, prints only the iv-th elements of SIMD vectors |
Definition at line 207 of file KfMatrixSym.h.
References kDimension, operator()(), sqrt(), and ToStringCorrelations().
Referenced by ToStringCorrelations().
|
staticconstexpr |
matrix dimension
Definition at line 38 of file KfMatrixSym.h.
Referenced by IsFinite(), IsSimdEntryConsistent(), ToString(), and ToStringCorrelations().
|
staticconstexpr |
N of matrix elements.
Definition at line 39 of file KfMatrixSym.h.