aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--interactionhandler.cpp13
-rw-r--r--interactionhandler.h14
2 files changed, 22 insertions, 5 deletions
diff --git a/interactionhandler.cpp b/interactionhandler.cpp
index 2eb55bb..4046acc 100644
--- a/interactionhandler.cpp
+++ b/interactionhandler.cpp
@@ -11,6 +11,14 @@ InteractionHandler::InteractionHandler(const arma::mat &X,
{
}
+void InteractionHandler::setTechnique(InteractionHandler::Technique technique)
+{
+ if (m_technique == technique)
+ return;
+
+ m_technique = technique;
+}
+
void InteractionHandler::setSubsample(const arma::mat &Ys)
{
switch (m_technique) {
@@ -18,11 +26,16 @@ void InteractionHandler::setSubsample(const arma::mat &Ys)
mp::plmp(m_X, m_sampleIndices, Ys, m_Y);
break;
case TECHNIQUE_LSP:
+ // TODO
// mp::lsp(m_X, m_sampleIndices, Ys, m_Y);
break;
case TECHNIQUE_LAMP:
mp::lamp(m_X, m_sampleIndices, Ys, m_Y);
break;
+ case TECHNIQUE_PEKALSKA:
+ // TODO
+ // mp::pekalska(m_X, m_sampleIndices, Ys, m_Y);
+ break;
}
emit subsampleChanged(m_Y);
diff --git a/interactionhandler.h b/interactionhandler.h
index 784746e..eeda230 100644
--- a/interactionhandler.h
+++ b/interactionhandler.h
@@ -8,15 +8,16 @@ class InteractionHandler : public QObject
{
Q_OBJECT
public:
- enum InteractiveTechnique {
+ Q_ENUMS(Technique)
+ enum Technique {
TECHNIQUE_PLMP,
TECHNIQUE_LAMP,
- TECHNIQUE_LSP
+ TECHNIQUE_LSP,
+ TECHNIQUE_PEKALSKA
};
InteractionHandler(const arma::mat &X, const arma::uvec &sampleIndices);
-
- void setTechnique(InteractiveTechnique technique) { m_technique = technique; }
+ void setTechnique(Technique technique);
signals:
void subsampleChanged(const arma::mat &Y);
@@ -24,10 +25,13 @@ signals:
public slots:
void setSubsample(const arma::mat &Ys);
+protected:
+ InteractionHandler() {}
+
private:
arma::mat m_X, m_Y;
arma::uvec m_sampleIndices;
- InteractiveTechnique m_technique;
+ Technique m_technique;
};
#endif // INTERACTIONHANDLER_H