Belle II Software development
|
Collection of functions related to covariance matrices. More...
#include <CovarianceMatrixUtil.h>
Static Public Member Functions | |
template<int N> | |
static CovarianceMatrix< N > | identity () |
Constructs an identity matrix. | |
template<int N> | |
static void | transport (const JacobianMatrix< N, N > &jacobian, CovarianceMatrix< N > &cov) |
Transport the covariance matrix inplace with the given jacobian matrix. | |
template<int M, int N> | |
static CovarianceMatrix< M > | transported (const JacobianMatrix< M, N > &jacobian, const CovarianceMatrix< N > &cov) |
Return a copy of the covariance matrix transported with the given jacobian matrix. | |
template<int N> | |
static void | scale (const ParameterVector< N > &scales, CovarianceMatrix< N > &cov) |
Scale the covariance inplace by the given factors in each parameter. | |
template<int N> | |
static CovarianceMatrix< N > | scale (const ParameterVector< N > &scales, const CovarianceMatrix< N > &cov) |
Return a copy of the covariance scaled by the given factors in each parameter. | |
template<int N1, int N2> | |
static CovarianceMatrix< N1+N2 > | stackBlocks (const CovarianceMatrix< N1 > &block1, const CovarianceMatrix< N2 > &block2) |
Combines two covariance matrices by putting them in two blocks on the diagonal of a larger matrix. | |
template<class ACovarianceMatrix , int I = 0, int N = 0> | |
static ACovarianceMatrix | getSub (const CovarianceMatrix< N > &cov) |
Gets a subcovariance from a covariance matrix. | |
template<int N> | |
static CovarianceMatrix< N > | fromPrecision (const PrecisionMatrix< N > &prec) |
Convert precision matrix to covariance matrix - allows for reduced rank. | |
template<int N> | |
static PrecisionMatrix< N > | toPrecision (const CovarianceMatrix< N > &cov) |
Convert covariance matrix to precision matrix - allows for reduced rank. | |
template<int N> | |
static CovarianceMatrix< N > | fromFullPrecision (const PrecisionMatrix< N > &prec) |
Convert covariance matrix to precision matrix - assumes full rank. | |
template<int N> | |
static PrecisionMatrix< N > | fullToPrecision (const CovarianceMatrix< N > &cov) |
Convert precision matrix to covariance matrix - assumes full rank. | |
template<int N> | |
static double | average (const ParameterVector< N > &par1, const CovarianceMatrix< N > &cov1, const ParameterVector< N > &par2, const CovarianceMatrix< N > &cov2, ParameterVector< N > &par, CovarianceMatrix< N > &cov) |
Averages two parameter vectors taking into account their respective covariances. | |
template<int M, int N1> | |
static double | average (const ParameterVector< N1 > &par1, const CovarianceMatrix< N1 > &cov1, const JacobianMatrix< N1, M > &ambiguity1, const ParameterVector< M > &par2, const CovarianceMatrix< M > &cov2, ParameterVector< M > &par, CovarianceMatrix< M > &cov) |
Averages two parameter vectors, one being from a projected space, taking into account their respective covariances and the ambiguity of the projection to the actual state. | |
template<int M, int N1, int N2> | |
static double | average (const ParameterVector< N1 > &par1, const CovarianceMatrix< N1 > &cov1, const JacobianMatrix< N1, M > &ambiguity1, const ParameterVector< N2 > &par2, const CovarianceMatrix< N2 > &cov2, const JacobianMatrix< N2, M > &ambiguity2, ParameterVector< M > &par, CovarianceMatrix< M > &cov) |
Averages two parameter vectors from a projected space taking into account their respective covariances and ambiguity matrices. | |
template<int M, int N1> | |
static double | kalmanUpdate (const ParameterVector< N1 > &par1, const CovarianceMatrix< N1 > &cov1, const JacobianMatrix< N1, M > &ambiguity1, ParameterVector< M > &par2, CovarianceMatrix< M > &cov2) |
Updates a parameter and its covariance by integrating information from parameter vector in a projected space and its covariances. | |
Collection of functions related to covariance matrices.
Definition at line 36 of file CovarianceMatrixUtil.h.
|
inlinestatic |
Averages two parameter vectors taking into account their respective covariances.
par1 | First parameters | |
cov1 | Covariance matrix to the first parameters | |
par2 | Second parameters | |
cov2 | Covariance matrix to the second parameters | |
[out] | par | Averaged parameters |
[out] | cov | Averaged covariance matrix |
Definition at line 146 of file CovarianceMatrixUtil.h.
|
inlinestatic |
Averages two parameter vectors, one being from a projected space, taking into account their respective covariances and the ambiguity of the projection to the actual state.
par1 | First parameters | |
cov1 | Covariance matrix to the first parameters | |
ambiguity1 | Projection ambiguity of the first parameters | |
par2 | Second parameters | |
cov2 | Covariance matrix to the second parameters | |
[out] | par | Averaged parameters |
[out] | cov | Averaged covariance matrix |
Definition at line 177 of file CovarianceMatrixUtil.h.
|
inlinestatic |
Averages two parameter vectors from a projected space taking into account their respective covariances and ambiguity matrices.
par1 | First parameters | |
cov1 | Covariance matrix to the first parameters | |
ambiguity1 | Projection ambiguity of the first parameters | |
par2 | Second parameters | |
cov2 | Covariance matrix to the second parameters | |
ambiguity2 | Projection ambiguity of the second parameters | |
[out] | par | Averaged parameters |
[out] | cov | Averaged covariance matrix |
Definition at line 210 of file CovarianceMatrixUtil.h.
|
inlinestatic |
Convert covariance matrix to precision matrix - assumes full rank.
Definition at line 118 of file CovarianceMatrixUtil.h.
|
inlinestatic |
Convert precision matrix to covariance matrix - allows for reduced rank.
Definition at line 100 of file CovarianceMatrixUtil.h.
|
inlinestatic |
Convert precision matrix to covariance matrix - assumes full rank.
Definition at line 127 of file CovarianceMatrixUtil.h.
|
inlinestatic |
Gets a subcovariance from a covariance matrix.
Definition at line 91 of file CovarianceMatrixUtil.h.
|
inlinestatic |
Constructs an identity matrix.
Definition at line 40 of file CovarianceMatrixUtil.h.
|
inlinestatic |
Updates a parameter and its covariance by integrating information from parameter vector in a projected space and its covariances.
The update is expressed in terms of Kalman's equations.
This function updates the values of the second parameters in place.
par1 | First parameters | |
cov1 | Covariance matrix to the first parameters | |
ambiguity1 | Projection ambiguity of the first parameters | |
[in,out] | par2 | Second parameters - updated inplace |
[in,out] | cov2 | Second covariance matrix - updated inplace |
Definition at line 249 of file CovarianceMatrixUtil.h.
|
inlinestatic |
Return a copy of the covariance scaled by the given factors in each parameter.
Definition at line 71 of file CovarianceMatrixUtil.h.
|
inlinestatic |
Scale the covariance inplace by the given factors in each parameter.
Definition at line 64 of file CovarianceMatrixUtil.h.
|
inlinestatic |
Combines two covariance matrices by putting them in two blocks on the diagonal of a larger matrix.
Definition at line 80 of file CovarianceMatrixUtil.h.
|
inlinestatic |
Convert covariance matrix to precision matrix - allows for reduced rank.
Definition at line 109 of file CovarianceMatrixUtil.h.
|
inlinestatic |
Transport the covariance matrix inplace with the given jacobian matrix.
Definition at line 47 of file CovarianceMatrixUtil.h.
|
inlinestatic |
Return a copy of the covariance matrix transported with the given jacobian matrix.
Definition at line 54 of file CovarianceMatrixUtil.h.