MetricKnn API
Fast Similarity Search using the Metric Space Approach
Public Member Functions | List of all members
mknn::DistanceCustomInstance Class Referenceabstract

Abstract class that must be inherited to define a custom distance. More...

#include <mknn_distance.hpp>

Public Member Functions

virtual double evalDistance (void *object_left, void *object_right, double current_threshold)=0
 The function of a custom distance that computes the distance between two objects. More...
 

Detailed Description

Abstract class that must be inherited to define a custom distance.

Member Function Documentation

virtual double mknn::DistanceCustomInstance::evalDistance ( void *  object_left,
void *  object_right,
double  current_threshold 
)
pure virtual

The function of a custom distance that computes the distance between two objects.

The parameters state_dist is the value returned by mknn_function_distanceEval_start. The parameters domain_left and domain_right are the same objects given to DistanceCustomFactory::newInstance

Parameters
object_leftis the left object of the distance.
object_rightis the right object of the distance.
current_thresholdis the value of the current k-th candidate in a search. This value may be used to trigger an early termination of the computation. See DistanceEval::eval.
Returns
the distance value between object_left and object_right which must be a number >= 0.

The documentation for this class was generated from the following file:
Powered by Download MetricKnn