diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2016-01-18 15:46:05 +0100 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2016-01-18 15:46:05 +0100 |
commit | 8cc4c24249600392871cc802f3ac4dd27368d335 (patch) | |
tree | 9bfde6414953828b379ee3728f5d92bbb772558d /distortionobserver.cpp | |
parent | d0ba4bbd9eb7b550cf71bb421e2a6f8b83018b48 (diff) |
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)
Diffstat (limited to 'distortionobserver.cpp')
-rw-r--r-- | distortionobserver.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
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; - } -} |