27 #include "../core/translator/Translator.h" 28 #include "../dataaccess/dataset/DataSet.h" 39 assert(v1.size() == v2.size());
41 double distance = 0.0;
43 for (
unsigned int i = 0; i < v1.size(); i++)
45 v1minusv2 = v1[i] - v2[i];
46 distance += v1minusv2 * v1minusv2;
51 return sqrt(distance);
Utility functions for Classification.
TECLEXPORT double GetEuclideanDistance(std::vector< double > v1, std::vector< double > v2)
Computes euclidean distance between two double vectors.
Configuration flags for the Terrralib Classification module.
Enumerations related to the Classification module.
An exception class for the Classification module.