aboutsummaryrefslogtreecommitdiff
path: root/projectionobserver.h
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2016-02-10 18:31:48 -0200
committerSamuel Fadel <samuelfadel@gmail.com>2016-02-10 18:31:48 -0200
commitb45a21976bece19da81166324dc1cc4260a0e0f4 (patch)
tree2f21da285edb214766fa559081b76a6754cfa8b0 /projectionobserver.h
parent8d4e5ff43fd9d51dc05d8d2dd87f69ab35bee423 (diff)
Added ProjectionHistory object for history tracking.
Diffstat (limited to 'projectionobserver.h')
-rw-r--r--projectionobserver.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/projectionobserver.h b/projectionobserver.h
index 6d8b0f9..11338f5 100644
--- a/projectionobserver.h
+++ b/projectionobserver.h
@@ -4,6 +4,8 @@
#include <QObject>
#include <armadillo>
+#include "projectionhistory.h"
+
class ProjectionObserver
: public QObject
{
@@ -13,7 +15,9 @@ public:
static const int OBSERVER_DIFF_PREVIOUS = 1;
static const int OBSERVER_DIFF_ORIGINAL = 2;
- ProjectionObserver(const arma::mat &X, const arma::uvec &cpIndices);
+ ProjectionObserver(const arma::mat &X,
+ const arma::uvec &cpIndices,
+ ProjectionHistory *history);
signals:
void valuesChanged(const arma::vec &values) const;
@@ -34,7 +38,7 @@ private:
bool emitValuesChanged() const;
int m_type;
- arma::mat m_X, m_Y, m_firstY, m_prevY;
+ arma::mat m_X;
arma::mat m_distX, m_distY, m_firstDistY, m_prevDistY;
arma::uvec m_cpIndices, m_rpIndices;
@@ -47,7 +51,7 @@ private:
// TODO: one per implemented measure
arma::vec m_values, m_firstValues, m_prevValues;
- bool m_hasFirst, m_hasPrev;
+ ProjectionHistory *m_history;
};
#endif // PROJECTIONOBSERVER_H