aboutsummaryrefslogtreecommitdiff
path: root/interactionhandler.cpp
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2015-12-19 12:27:02 +0100
committerSamuel Fadel <samuelfadel@gmail.com>2015-12-19 12:27:02 +0100
commit20fb359d2a487f425463f2efe2390c1d34e724d9 (patch)
treec20ba104c3630233bdc741a07f5908c997f32a62 /interactionhandler.cpp
parent044eb56f2a332ef10927a8539ab1450b53add6b5 (diff)
InteractionHandler: added setTechnique()
* Added new method to set the technique being used (should probably add the related signals * Added a new protected constructor to use enums with QML * Enum type renamed to Technique (was InteractiveTechnique) voronoisplat.cpp \
Diffstat (limited to 'interactionhandler.cpp')
-rw-r--r--interactionhandler.cpp13
1 files changed, 13 insertions, 0 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);