int
main(int, char *[])
{
using DistanceMetricType =
DistanceMetricType::Pointer distanceMetric = DistanceMetricType::New();
distanceMetric->SetMeasurementVectorSize(2);
DistanceMetricType::OriginType originPoint(2);
MeasurementVectorType queryPointA(2);
MeasurementVectorType queryPointB(2);
originPoint[0] = 0;
originPoint[1] = 0;
queryPointA[0] = 2;
queryPointA[1] = 2;
queryPointB[0] = 3;
queryPointB[1] = 3;
distanceMetric->SetOrigin(originPoint);
std::cout
<< "Euclidean distance between the origin and the query point A = "
<< distanceMetric->Evaluate(queryPointA) << std::endl;
std::cout << "Euclidean distance between the two query points (A and B) = "
<< distanceMetric->Evaluate(queryPointA, queryPointB)
<< std::endl;
std::cout << "Coordinate distance between "
<< "the first components of the two query points = "
<< distanceMetric->Evaluate(queryPointA[0], queryPointB[0])
<< std::endl;
return EXIT_SUCCESS;
}