aboutsummaryrefslogtreecommitdiff
path: root/selectionhandler.cpp
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2015-09-24 14:47:51 -0300
committerSamuel Fadel <samuelfadel@gmail.com>2015-09-24 14:47:51 -0300
commit0ff5553653bbfd0e773970b78bee356543c2bf74 (patch)
tree8bbd17688afe9c5d3dbe84d4b1feb74496aac174 /selectionhandler.cpp
parentd0aec5a4070c9140228ec6e17e22a99588e6d12d (diff)
Updated selection handling code; implemented option to save subsample plot.
Diffstat (limited to 'selectionhandler.cpp')
-rw-r--r--selectionhandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/selectionhandler.cpp b/selectionhandler.cpp
index 4c488a0..44eef28 100644
--- a/selectionhandler.cpp
+++ b/selectionhandler.cpp
@@ -5,14 +5,14 @@ SelectionHandler::SelectionHandler(const arma::uvec &sampleIndices)
{
}
-void SelectionHandler::setSelection(const arma::uvec &selection)
+void SelectionHandler::setSelection(const QSet<int> &selection)
{
- arma::uvec newSelection(selection);
+ QSet<int> newSelection;
// The selecion happens over the sample indices. We use the original dataset
// indices in sampleIndices to translate indices.
- for (auto it = newSelection.begin(); it != newSelection.end(); it++) {
- *it = m_sampleIndices[*it];
+ for (auto it = selection.begin(); it != selection.end(); it++) {
+ newSelection.insert(m_sampleIndices[*it]);
}
emit selectionChanged(newSelection);