From ff10df2f8bfc71afe8637eec67d11d6ce87b673b Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Thu, 28 Jan 2016 15:52:39 +0100 Subject: ProjectionObsever now responds to selection changes. * Scatterplot: small fix to selection updates * ProjectionObserver: whenever CP selection changes, compute influence of CPs over all RPs. Whenever RP selection changes, compute influence of RPs by all CPs. * ProjectionObserver: with empty selections, go back to normal mode --- projectionobserver.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'projectionobserver.h') diff --git a/projectionobserver.h b/projectionobserver.h index c0ccd8a..badca4d 100644 --- a/projectionobserver.h +++ b/projectionobserver.h @@ -23,6 +23,8 @@ signals: public slots: void setMap(const arma::mat &Y); bool setType(int type); + void setCPSelection(const std::vector &cpSelection); + void setRPSelection(const std::vector &rpSelection); private: bool emitValuesChanged() const; @@ -32,6 +34,13 @@ private: arma::mat m_distX, m_distY, m_origDistY, m_prevDistY; arma::uvec m_cpIndices, m_rpIndices; + bool m_cpSelectionEmpty, m_rpSelectionEmpty; + std::vector m_cpSelection, m_rpSelection; + + // alpha(i, j): the influence CP j has on RP i + void computeAlphas(); + arma::mat m_alphas, m_influences; + // TODO: one per implemented measure arma::vec m_values, m_prevValues, m_origValues; }; -- cgit v1.2.3