aboutsummaryrefslogtreecommitdiff
path: root/projectionobserver.h
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2016-01-28 15:52:39 +0100
committerSamuel Fadel <samuelfadel@gmail.com>2016-01-28 15:55:07 +0100
commitff10df2f8bfc71afe8637eec67d11d6ce87b673b (patch)
tree3e7ba65d7c2cff27a2d13511f25857a4e5326e1d /projectionobserver.h
parent5404374a510b4c09bd4d38331a1255583abb28d4 (diff)
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
Diffstat (limited to 'projectionobserver.h')
-rw-r--r--projectionobserver.h9
1 files changed, 9 insertions, 0 deletions
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<bool> &cpSelection);
+ void setRPSelection(const std::vector<bool> &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<int> 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;
};