From 8cc4c24249600392871cc802f3ac4dd27368d335 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Mon, 18 Jan 2016 15:46:05 +0100 Subject: Added observer to update values displayed based on some metric. * Modified main() function to connect signals/slots to display calculated values * Color scales are no longer shared; they are also normalized to each component's own data * Stub mouse handling in BarChart (changes cursor shape) --- distortionobserver.cpp | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 distortionobserver.cpp (limited to 'distortionobserver.cpp') diff --git a/distortionobserver.cpp b/distortionobserver.cpp deleted file mode 100644 index 29d7e6f..0000000 --- a/distortionobserver.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "distortionobserver.h" - -#include "mp.h" - -DistortionObserver::DistortionObserver(const arma::mat &X, - const arma::uvec &sampleIndices) - : m_X(X) - , m_sampleIndices(sampleIndices) - , m_distortionMeasure(0) -{ - m_distX = mp::dist(m_X); -} - -void DistortionObserver::setMeasure(DistortionMeasure *measure) -{ - m_distortionMeasure = measure; -} - -void DistortionObserver::setMap(const arma::mat &Y) -{ - if (!m_distortionMeasure) { - return; - } - - arma::vec measures = m_distortionMeasure->measure(m_distX, mp::dist(Y)); - - if (m_Y.n_elem != 0) { - emit mapChanged(measures - m_measures); - } else { - m_Y = Y; - m_measures = measures; - } -} -- cgit v1.2.3