Commit a2ba1956 authored by Thibault Lejemble's avatar Thibault Lejemble

fix covariance matrix

parent c4caf9d3
......@@ -59,13 +59,8 @@ CovariancePlaneFit<DataPoint, _WFunctor, T>::finalize ()
// Finalize the centroid (still expressed in local basis)
m_cog = m_cog/m_sumW;
// Center the covariance on the centroid:
m_cov += - Scalar(2) * m_cov/m_sumW + m_cog * m_cog.transpose();
// \note The covariance matrix should be here normalized by m_sumW.
// As it does not affect the eigen decomposition, we skip this normalization
// to save computation.
// Center the covariance on the centroid
m_cov = m_cov/m_sumW - m_cog * m_cog.transpose();
#ifdef __CUDACC__
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment