QueryProcessor.SF.ScoringFunction
Class ScoringFunction

java.lang.Object
  extended by QueryProcessor.SF.ScoringFunction.ScoringFunction
Direct Known Subclasses:
ScoringFunctionAVG, ScoringFunctionEMD, ScoringFunctionMIN

public abstract class ScoringFunction
extends java.lang.Object

Abstract class modelling a scoring function.


Constructor Summary
ScoringFunction()
           
 
Method Summary
abstract  double distance(Image i1, Image i2, Matrix distances)
          Computes the distance between two images given the matrix of distances between images' regions.
abstract  double threshold(Image query, double[] thresholds)
          Computes the threshold value for a query image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScoringFunction

public ScoringFunction()
Method Detail

distance

public abstract double distance(Image i1,
                                Image i2,
                                Matrix distances)
Computes the distance between two images given the matrix of distances between images' regions.

Parameters:
i1 - First image.
i2 - Second image.
distances - Matrix containing distance values between images' regions.
Returns:
The distance between the two given images.

threshold

public abstract double threshold(Image query,
                                 double[] thresholds)
Computes the threshold value for a query image.

Parameters:
query - The query image.
thresholds - Array of values corresponding to threshold values for individual region sorted accesses.
Returns:
The threshold value.