viper.comparison.distances
Interface AttrDistance

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

public interface AttrDistance
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(Attribute alpha, FrameSpan alphaSpan, Attribute beta, FrameSpan betaSpan, Attribute blackout, FrameSpan blackoutSpan, Attribute ignore, FrameSpan ignoreSpan, int frame, CanonicalFileDescriptor cfd)
          Compute the distance, with blackout and ignore.
 java.lang.Number getDistance(Attribute alpha, FrameSpan alphaSpan, Attribute beta, FrameSpan betaSpan, int frame, 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(Attribute alpha,
                                    FrameSpan alphaSpan,
                                    Attribute beta,
                                    FrameSpan betaSpan,
                                    int frame,
                                    CanonicalFileDescriptor cfd)
Compute the distance.

Parameters:
alpha - the alpha attribute
alphaSpan - the alpha attribute's span
beta - the beta attribute
betaSpan - the beta attribute's span
frame - the frame to get the distance in
cfd - the source media
Returns:
the distance

getDistance

public java.lang.Number getDistance(Attribute alpha,
                                    FrameSpan alphaSpan,
                                    Attribute beta,
                                    FrameSpan betaSpan,
                                    Attribute blackout,
                                    FrameSpan blackoutSpan,
                                    Attribute ignore,
                                    FrameSpan ignoreSpan,
                                    int frame,
                                    CanonicalFileDescriptor cfd)
                             throws IgnoredValueException
Compute the distance, with blackout and ignore. Note that blackout and ignore may be set to null if there is nothing to black out or ignore.

Parameters:
alpha - the alpha attribute
alphaSpan - the alpha attribute's span
beta - the beta attribute
betaSpan - the beta attribute's span
blackout - the blackout region
blackoutSpan - the blackout region's span
ignore - the region to ignore
ignoreSpan - the ignored region's span
frame - the frame to get the distance in
cfd - the source media
Returns:
the distance, given the constraints
Throws:
IgnoredValueException - when the ignored region is such that it prevents evaluation of the distance.