diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2016-01-13 11:09:06 +0100 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2016-01-13 11:09:06 +0100 |
commit | b1c4eac81a46c41ff9f36f4226b9058bbb379d3b (patch) | |
tree | af519d35228085988bec8cc36a2f0b8393f5d281 /main.h | |
parent | a621eb3ee0bf04e998b0e8479e8166f25e25c268 (diff) |
Subsamples/samples renamed to control points (CP) where possible.
Diffstat (limited to 'main.h')
-rw-r--r-- | main.h | 40 |
1 files changed, 24 insertions, 16 deletions
@@ -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; }; |