aboutsummaryrefslogtreecommitdiff
path: root/distortionobserver.h
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2015-07-24 13:01:16 -0300
committerSamuel Fadel <samuelfadel@gmail.com>2015-07-24 13:01:16 -0300
commit6da67a32e56c101b9334d2c6f33bd5238d082330 (patch)
tree87d6f4dbc4b1d926be75c432ede2578ab45d8b33 /distortionobserver.h
parentb7e1060b7cb71b30b91cc65c011b719e255c0a06 (diff)
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.
Diffstat (limited to 'distortionobserver.h')
-rw-r--r--distortionobserver.h29
1 files changed, 29 insertions, 0 deletions
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 <QObject>
+#include <armadillo>
+
+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