From 6da67a32e56c101b9334d2c6f33bd5238d082330 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Fri, 24 Jul 2015 13:01:16 -0300 Subject: Color mapping in Scatterplot and initial measures. - Scatterplot: can now map any floating point data to colors; - Scatterplot: somewhat optimized geometry/material updates; - Removed anything related to labels where it was not necessary; - Added observers to implement distortion (via measures) visualization; - Added skeleton implementations of NP and silhouette. --- distortionobserver.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 distortionobserver.h (limited to 'distortionobserver.h') diff --git a/distortionobserver.h b/distortionobserver.h new file mode 100644 index 0000000..9141d25 --- /dev/null +++ b/distortionobserver.h @@ -0,0 +1,29 @@ +#ifndef DISTORTIONOBSERVER_H +#define DISTORTIONOBSERVER_H + +#include +#include + +class DistortionObserver : public QObject +{ + Q_OBJECT +public: + DistortionObserver(const arma::mat &X, const arma::uvec &sampleIndices); + virtual ~DistortionObserver(); + +signals: + void mapChanged(const arma::vec &distortion); + +public slots: + void setMap(const arma::mat &Y); + +protected: + virtual arma::vec measureFunc(const arma::mat &distA, const arma::mat &distB) = 0; + +private: + arma::mat m_X, m_Y, m_distX; + arma::uvec m_sampleIndices; + arma::vec m_measures; +}; + +#endif // DISTORTIONOBSERVER_H -- cgit v1.2.3