Skip to content
Snippets Groups Projects
Verified Commit 8919d760 authored by Stephen Nicholas Swatman's avatar Stephen Nicholas Swatman
Browse files

Fix aliasing bug in newCovarianceMatrix method

The `PatternTrackParameters` class conains a method by the name of
`newCovarianceMatrix` which updates the covariance matrix of the object
it is called on according to the covariance matrix in a second set of
parameters and a Jacobian matrix. The calculation performed is J*C*J^T.
In many cases where this method is called, the object on which it is
called is the same as the object given as the right hand side of the
operation. This means that the covariance matrices alias, leading to
possibly incorrect results. It also invites behaviour where the
calculations are done using invalid covariance matrices.

This commit fixes these issues by changing the signature of the method
to accept a covariance matrix directly instead of a second set of track
parameters. This makes it harder, albeit not impossible, to alias the
covariance matrices as described earlier. It also solves the invalid
covariance matrix problem described in !37151.
parent 359a3dba
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment