DistanceComputer Class Reference

#include <distance-computer.h>

Inheritance diagram for DistanceComputer:

L1DistanceComputer L2DistanceComputer List of all members.

Detailed Description

An abstract interface for computing distance between two Features.


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).


Constructor & Destructor Documentation

~DistanceComputer (  )  [virtual]


Member Function Documentation

virtual double ComputeDistance ( const Feature f1,
const Feature f2 
) const [pure virtual]

Compute distance.

Implemented in L1DistanceComputer, and L2DistanceComputer.

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.


The documentation for this class was generated from the following files:
Generated on Wed May 2 11:17:13 2007 for libpmk by  doxygen 1.5.1