#include <distance-computer.h>
Inheritance diagram for DistanceComputer:
Public Member Functions | |
virtual | ~DistanceComputer () |
virtual double | ComputeDistance (const Feature &f1, const Feature &f2) const=0 |
Compute distance. | |
virtual double | ComputeDistance (const Feature &f1, const Feature &f2, double max_distance) const |
Quickly compute min(actual_distance(f1, f2), max_distance). |
~DistanceComputer | ( | ) | [virtual] |
double ComputeDistance | ( | const Feature & | f1, | |
const Feature & | f2, | |||
double | max_distance | |||
) | const [virtual] |
Quickly compute min(actual_distance(f1, f2), max_distance).
This is the same as ComputeDistance, except it will stop calculating things when it knows the distance will be greater than max_distance.
Reimplemented in L1DistanceComputer, and L2DistanceComputer.