diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2016-04-13 12:20:01 -0300 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2016-04-13 12:20:01 -0300 |
commit | 3c92c6256fd796f24db177caf813ba52e2389ff8 (patch) | |
tree | 4f9f0c3c08c07eb2ffcaa868a3f57ff4dcc66beb /projectionhistory.h | |
parent | 11a58ca2c92fc3c44daa1643fbc5148bf96b407c (diff) |
Bundling now supports selection.
Selection is implemented via main() updating the line plot using
the current active selection. Beware of bug (issue #23).
Also adds support for setting the line width, while changing the
default line width to 2 pixels wide.
ProjectionHistory: now reports changes to selections relative to
the whole dataset, not only CPs/RPs.
Diffstat (limited to 'projectionhistory.h')
-rw-r--r-- | projectionhistory.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/projectionhistory.h b/projectionhistory.h index e20f16c..4fc2ef4 100644 --- a/projectionhistory.h +++ b/projectionhistory.h @@ -1,6 +1,8 @@ #ifndef PROJECTIONHISTORY_H #define PROJECTIONHISTORY_H +#include <vector> + #include <QObject> #include <armadillo> @@ -46,12 +48,17 @@ signals: void cpValuesRewound(const arma::vec &values) const; void rpValuesRewound(const arma::vec &values) const; + void cpSelectionChanged(const std::vector<bool> &cpSelection) const; + void rpSelectionChanged(const std::vector<bool> &rpSelection) const; + void selectionChanged(const std::vector<bool> &selection) const; + public slots: void addMap(const arma::mat &Y); bool setType(ObserverType type); void setCPSelection(const std::vector<bool> &cpSelection); void setRPSelection(const std::vector<bool> &rpSelection); + void setSelection(const std::vector<bool> &selection); void setRewind(double t); @@ -59,6 +66,9 @@ private: bool emitValuesChanged() const; void updateUnreliability(); + void cpSelectionPostProcess(); + void rpSelectionPostProcess(); + ObserverType m_type; arma::mat m_X, m_Y, m_firstY, m_prevY; @@ -68,6 +78,7 @@ private: bool m_cpSelectionEmpty, m_rpSelectionEmpty; std::vector<int> m_cpSelection, m_rpSelection; + std::vector<bool> m_selection; // alpha(i, j): the influence CP j has on RP i void computeAlphas(); |