Have seen in places this pattern
AmgSymMatrix(5)* covariance = new AmgSymMatrix(5); //Calculate foo.updateParameters(mean, covariance);
where foo is
This leads to a new / delete cycle for the existing method, new matrix to pass, internally delete the one that is hold by the
Add another interface, which allows to pass by ref and if the
m_covariance is there allows to be updated in place (no new/delete). If
m_covariance is not there a
new is created with the passed values.