public class ObjectFeatureSetSmithWaterman extends ObjectFeatureOrderedSet
SequenceMatchingCost.SIFT_DEFAULT
.
A user-specific scoring can be set throgh static member defaultCost
.
Distance is computed based on the similarity evaluted after projecting the feature set to X axis and to Y axis.
In particular, distance is 1 - (sim_X + simY) / 2*max_sim, where
max_sim = min(featureCount1, featureCount2) * max_cost.
If the feature sets are ordered in advance, the distance is returned only by this ordering
(so no reorderings by X and Y axes are done)!!!ObjectFeatureOrderedSet.SlidingWindow
LocalAbstractObject.DataEqualObject, LocalAbstractObject.TextStreamFactory<T extends LocalAbstractObject>, LocalAbstractObject.TrivialDistanceFunction
Modifier and Type | Field and Description |
---|---|
static SequenceMatchingCost |
defaultCost |
sortDim
objects, QUANTIZED_FEATURES_SPLIT_CHARACTER
counterDistanceComputations, counterLowerBoundDistanceComputations, counterPrecomputedDistanceSavings, counterUpperBoundDistanceComputations, MAX_DISTANCE, MIN_DISTANCE, suppData, trivialDistanceFunction, UNKNOWN_DISTANCE
Constructor and Description |
---|
ObjectFeatureSetSmithWaterman(BinaryInput input,
BinarySerializator serializator) |
ObjectFeatureSetSmithWaterman(java.io.BufferedReader stream) |
ObjectFeatureSetSmithWaterman(java.lang.String locatorURI,
int width,
int height,
java.util.Collection<? extends ObjectFeature> objects) |
addObject, binarySerialize, getBinarySize, getDimension, getHeight, getOrderOfFeatures, getWidth, isFeaturesOrdered, iterator, iterator, orderFeatures, parseObjectComment, windowIterator, windowIterator, writeObjectComment
clearSurplusData, clone, clone, cloneRandomlyModify, containsParameter, dataEquals, dataHashCode, filterFeatures, getObject, getObjectCount, getParameter, getParameter, getParameter, getParameterCount, getParameterMap, getParameterNames, getRequiredParameter, getRequiredParameter, getSaveObjectsClass, getSize, getStringData, iterator, readObject, readObject, toString, writeData
clone, create, create, createMetaDistancesHolder, excludeUsingPrecompDist, getDistance, getDistance, getDistance, getDistanceFilter, getDistanceFilter, getDistanceFilter, getDistanceFilter, getDistanceLowerBound, getDistanceLowerBoundImpl, getDistanceStorePrecomputed, getDistanceStorePrecomputed, getDistanceStorePrecomputed, getDistanceUpperBound, getDistanceUpperBoundImpl, getFieldsForNames, getMaxDistance, getNormDistance, getPrecomputedDistance, getPrecomputedDistance, getRandomChar, getRandomNormal, chainDestroy, chainFilter, includeUsingPrecompDist, isDistanceCompatible, peekNextChar, readAttributesFromStream, readObjectComments, readObjectCommentsWithoutData, unchainFilter, write, write, writeAttributesToStream
clone, getLocatorURI, getNoDataObject, getObjectKey, getObjectKey, getObjectLocatorURI, setObjectKey
public static SequenceMatchingCost defaultCost
public ObjectFeatureSetSmithWaterman(BinaryInput input, BinarySerializator serializator) throws java.io.IOException
java.io.IOException
public ObjectFeatureSetSmithWaterman(java.io.BufferedReader stream) throws java.io.IOException
java.io.IOException
public ObjectFeatureSetSmithWaterman(java.lang.String locatorURI, int width, int height, java.util.Collection<? extends ObjectFeature> objects)
public static float getMaximumSimilarity(SequenceMatchingCost cost, int featureCount1, int featureCount2)
public float getDistanceImpl(LocalAbstractObject o, float distTreshold)
LocalAbstractObject
LocalAbstractObject.getDistance(messif.objects.LocalAbstractObject)
for full explanation).
The implementation should not increment distanceComputations statistics.getDistanceImpl
in class LocalAbstractObject
o
- the object to compute distance todistTreshold
- the threshold value on the distancepublic static void setDefaultCost(SequenceMatchingCost cost)
protected static float getDistance(SequenceMatchingCost cost, ResetableIterator<ObjectFeature> it1, ResetableIterator<ObjectFeature> it2)
getDistanceImpl
public static float getSimilarity(SequenceMatchingCost cost, ResetableIterator<ObjectFeature> it1, ResetableIterator<ObjectFeature> it2)
public static float getSimilarityN(SequenceMatchingCost cost, ResetableIterator<ObjectFeature> it1, ResetableIterator<ObjectFeature> it2)
public static float getSimilarity(SequenceMatchingCost cost, float[][] distances)
public static float max4(float f1, float f2, float f3, float f4)
public static float getDistanceByWindowing(SequenceMatchingCost cost, ObjectFeatureOrderedSet.SlidingWindow wnd, ObjectFeatureOrderedSet fs1, ObjectFeatureOrderedSet fs2)