dignea  1.0.0
Diverse Instance Generator with Novelty Search and Evolutionary Algorithms
Distance.h
1 
2 
3 #ifndef __DISTANCE_H__
4 #define __DISTANCE_H__
5 
6 #include <algorithm>
7 #include <iostream>
8 #include <string>
9 #include <vector>
10 
11 using namespace std;
12 
19 template <typename T>
20 class Distance {
21  public:
22  Distance() = default;
23  virtual ~Distance() = default;
24 
31  virtual T compute(const vector<T>&, const vector<T>&) = 0;
32 };
33 
34 #endif
Abstract Distance Class to create an interface which can be use in different algorithms.
Definition: Distance.h:20
virtual T compute(const vector< T > &, const vector< T > &)=0
Computes the distance between the vectors of type T and returns the value. This method must be implem...