-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSimilarityEvaluator.h
23 lines (20 loc) · 1.01 KB
/
SimilarityEvaluator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "vrpoint.h"
#include "pointmanager.h"
#include <vector>
#include <utility>
/***
* A SimilarityEvaluator is a class that implements method of computing similarity between pathlines.
* It also implements methods to compute different things with these similarity metrics (ie find N closest paths)
* Designed to be subclassed with different implementations of the evaluateSimilarity method.
*
* It feels like I should have one abstract class for the representation of general computing similarity
* and another for doing computations, but eh.
*/
class SimilarityEvaluator{
public:
virtual double evaluateSimilarity(VRPoint& a, VRPoint& b) = 0;
virtual std::vector<int> getMostSimilarPaths(PointManager* pm, int targetIndex, int numPaths = 25);
virtual std::vector<int> getMostSimilarPathsFromSimilarities(std::vector<std::pair<int, double>> similarities, int numPaths = 25);
virtual std::vector<std::pair<int, double>> getAllPathSimilarities(PointManager* pm, int targetIndex);
float threshold = 0.007;
};