From 0615b37b56f3c2ffaf46255808a60f16b1d5be7c Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Mon, 4 Apr 2016 17:15:56 -0300 Subject: ProjectionHistory: added unreliability. --- projectionhistory.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'projectionhistory.cpp') diff --git a/projectionhistory.cpp b/projectionhistory.cpp index 55d9f60..20a006b 100644 --- a/projectionhistory.cpp +++ b/projectionhistory.cpp @@ -57,6 +57,7 @@ void ProjectionHistory::undo() m_Y = m_prevY; m_distY = m_prevDistY; m_values = m_prevValues; + updateUnreliability(); emit undoPerformed(); emit currentMapChanged(m_Y); @@ -73,6 +74,7 @@ void ProjectionHistory::reset() m_Y = m_firstY; m_distY = m_firstDistY; m_values = m_firstValues; + updateUnreliability(); emit resetPerformed(); emit currentMapChanged(m_Y); @@ -93,6 +95,7 @@ void ProjectionHistory::addMap(const arma::mat &Y) m_Y = Y; m_distY = mp::dist(Y); + updateUnreliability(); mp::aggregatedError(m_distX, m_distY, m_values); qDebug("Aggr. error: min: %f, max: %f", m_values.min(), m_values.max()); @@ -227,3 +230,9 @@ void ProjectionHistory::setRewind(double t) emit rpValuesRewound(values(m_rpIndices)); emit valuesRewound(values); } + +void ProjectionHistory::updateUnreliability() +{ + m_unreliability.copy_size(m_alphas); + m_unreliability = m_alphas % m_distY(m_rpIndices, m_cpIndices); +} -- cgit v1.2.3