-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDTW.h
More file actions
39 lines (32 loc) · 1.51 KB
/
DTW.h
File metadata and controls
39 lines (32 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef __DTW_H__
#define __DTW_H__
#include <vector>
#include "Signal.h"
using namespace std;
class DTW
{
private:
Signal mySignalA; //instances of the Signal class initialized in the constructor or modified through provided mutators
Signal mySignalB;
bool myCompared; // boolean variable that establishes if comparison has to be made between the signals before returning the myComparison vector
vector<double> myComparison; // vector that holds the result of the comparison between the two Signals.
void compare(); // method compares SignalA to SignalB
void initiateDTW(); // method calls on the data forwarding algorithm
double DTWDistance(vector<double> first, vector<double> second, int windowSize); // method performs the DTW and updates the myComparison vector.
public:
// Constructor takes in two Singnal instances and initializes its own private Signal fields.
DTW(Signal signalA, Signal signalB);
// Copy constructor.
DTW(const DTW& copy);
~DTW(){}; //Default destructor
// Method returns a vector containing the comparison between the two signals.
vector<double> getComparison();
// Accessors to query the Signal fields of the existing DTW class instance
Signal getFirst() const;
Signal getSecond() const;
// Mutators to easily modify signals that need to be compared. Obviously, a call to any one of these methods requires the comparsion to be performed again.
void setFirst(Signal signalA);
void setSecond(Signal signalB);
//overload the equals operators in Signal class?
};
#endif