aboutsummaryrefslogtreecommitdiff
path: root/main.h
diff options
context:
space:
mode:
Diffstat (limited to 'main.h')
-rw-r--r--main.h40
1 files changed, 24 insertions, 16 deletions
diff --git a/main.h b/main.h
index b6bed67..86024b9 100644
--- a/main.h
+++ b/main.h
@@ -22,11 +22,11 @@ public:
Q_INVOKABLE bool saveData() const {
bool ret = true;
- if (m_subsample.n_elem > 0 && m_indicesSavePath.size() > 0) {
- ret = ret && m_subsample.save(m_subsampleSavePath, arma::raw_ascii);
+ if (m_cp.n_elem > 0 && m_indicesSavePath.size() > 0) {
+ ret = ret && m_cp.save(m_cpSavePath, arma::raw_ascii);
}
- if (m_subsampleIndices.n_elem > 0 && m_subsampleSavePath.size() > 0) {
- ret = ret && m_subsampleIndices.save(m_indicesSavePath, arma::raw_ascii);
+ if (m_cpIndices.n_elem > 0 && m_cpSavePath.size() > 0) {
+ ret = ret && m_cpIndices.save(m_indicesSavePath, arma::raw_ascii);
}
return ret;
@@ -34,10 +34,18 @@ public:
Q_INVOKABLE bool loadDataset(const std::string &path) { return m_dataset.load(path, arma::raw_ascii); }
- Q_INVOKABLE void setIndicesSavePath(const std::string &path) { m_indicesSavePath = path; }
- Q_INVOKABLE void setIndicesSavePath(const QString &path) { setIndicesSavePath(path.toStdString()); }
- Q_INVOKABLE void setSubsampleSavePath(const std::string &path) { m_subsampleSavePath = path; }
- Q_INVOKABLE void setSubsampleSavePath(const QString &path) { setSubsampleSavePath(path.toStdString()); }
+ Q_INVOKABLE void setIndicesSavePath(const std::string &path) {
+ m_indicesSavePath = path;
+ }
+ Q_INVOKABLE void setIndicesSavePath(const QString &path) {
+ setIndicesSavePath(path.toStdString());
+ }
+ Q_INVOKABLE void setCPSavePath(const std::string &path) {
+ m_cpSavePath = path;
+ }
+ Q_INVOKABLE void setCPSavePath(const QString &path) {
+ setCPSavePath(path.toStdString());
+ }
void setInteractionHandler(InteractionHandler *interactionHandler) {
m_interactionHandler = interactionHandler;
@@ -53,14 +61,14 @@ public:
arma::vec labels() const { return m_dataset.col(m_dataset.n_cols - 1); }
public slots:
- void setSubsampleIndices(const arma::uvec &indices) { m_subsampleIndices = indices; }
- void setSubsample(const arma::mat &subsample) {
- if (subsample.n_cols != 2
- || subsample.n_rows != m_subsampleIndices.n_elem) {
+ void setCPIndices(const arma::uvec &indices) { m_cpIndices = indices; }
+ void setCP(const arma::mat &cp) {
+ if (cp.n_cols != 2
+ || cp.n_rows != m_cpIndices.n_elem) {
return;
}
- m_subsample = subsample;
+ m_cp = cp;
}
private:
@@ -71,9 +79,9 @@ private:
~Main() {}
Q_DISABLE_COPY(Main)
- arma::mat m_dataset, m_subsample;
- arma::uvec m_subsampleIndices;
- std::string m_indicesSavePath, m_subsampleSavePath;
+ arma::mat m_dataset, m_cp;
+ arma::uvec m_cpIndices;
+ std::string m_indicesSavePath, m_cpSavePath;
InteractionHandler *m_interactionHandler;
};