From 3c92c6256fd796f24db177caf813ba52e2389ff8 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Wed, 13 Apr 2016 12:20:01 -0300 Subject: 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. --- projectionhistory.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'projectionhistory.h') 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 + #include #include @@ -46,12 +48,17 @@ signals: void cpValuesRewound(const arma::vec &values) const; void rpValuesRewound(const arma::vec &values) const; + void cpSelectionChanged(const std::vector &cpSelection) const; + void rpSelectionChanged(const std::vector &rpSelection) const; + void selectionChanged(const std::vector &selection) const; + public slots: void addMap(const arma::mat &Y); bool setType(ObserverType type); void setCPSelection(const std::vector &cpSelection); void setRPSelection(const std::vector &rpSelection); + void setSelection(const std::vector &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 m_cpSelection, m_rpSelection; + std::vector m_selection; // alpha(i, j): the influence CP j has on RP i void computeAlphas(); -- cgit v1.2.3