viper.comparison.distances
Interface MeasureDistance

All Superinterfaces:
Distance
All Known Implementing Classes:
Distances.HelperMeasureDistance

public interface MeasureDistance
extends Distance

Like Filterable, Distances are a way of associating distance with data.


Field Summary
 
Fields inherited from interface viper.comparison.distances.Distance
BALANCED, CAND_V_TARGS, OVERALL_MEAN, OVERALL_SUM, TARG_V_CANDS
 
Method Summary
 java.lang.Number getDistance(Measurable alpha, Measurable beta, CanonicalFileDescriptor cfd)
          Compute the distance.
 java.lang.Number getDistance(Measurable alpha, Measurable beta, Measurable blackout, Measurable ignore, CanonicalFileDescriptor cfd)
          Compute the distance.
 
Methods inherited from interface viper.comparison.distances.Distance
getDistance, getExplanation, getType, isDistance, toString
 

Method Detail

getDistance

public java.lang.Number getDistance(Measurable alpha,
                                    Measurable beta,
                                    CanonicalFileDescriptor cfd)
Compute the distance. Only defined for static attributes and the like (read: FrameSpan).

Parameters:
alpha - the alpha value
beta - the beta value
cfd - the file descriptor that alpha and beta are defined within
Returns:
the distance between alpha and beta

getDistance

public java.lang.Number getDistance(Measurable alpha,
                                    Measurable beta,
                                    Measurable blackout,
                                    Measurable ignore,
                                    CanonicalFileDescriptor cfd)
                             throws IgnoredValueException
Compute the distance. Only defined for static attributes and the like (read: FrameSpan). This one includes blackout and ignore parameters - blackouts apply to regions that are losses, and ignore are for regions that are don't-care. For example, "scene" data may be marked as don't-care, or frames that don't meat a certain metric are qualified as blackout.

Parameters:
alpha - the first value
beta - the second value
blackout - the bad region
ignore - the region to ignore
cfd - the file on which the measurables are defined
Returns:
the distance between alpha and beta, given the constraints
Throws:
IgnoredValueException - when the ignored region is such that it prevents evaluation of the distance.