public class EditionDistance extends Object implements ProximityEObjectMatcher.DistanceFunction
Modifier and Type | Class and Description |
---|---|
static class |
EditionDistance.Builder
Builder class to configure an EditionDistance instance.
|
Constructor and Description |
---|
EditionDistance()
Instantiate a new Edition Distance that will use
WeightProviderDescriptorRegistryImpl.createStandaloneInstance() . |
EditionDistance(WeightProvider.Descriptor.Registry registry)
Instantiate a new Edition Distance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
areIdentic(Comparison inProgress,
EObject a,
EObject b)
Check that two objects are equals from the distance function point of view (distance should be 0)
You should prefer this method when you just want to check objects are not equals enabling the
distance to stop sooner.
|
static EditionDistance.Builder |
builder()
Create a new builder to instantiate and configure an EditionDistance.
|
double |
distance(Comparison inProgress,
EObject a,
EObject b)
Return the distance between two EObjects.
|
double |
getThresholdAmount(EObject eObj) |
protected double |
getThresholdRatio(int nbFeatures)
return a ratio to apply on the amount of maximum un-similarity amount depending on the number of
features which are considered.
|
public EditionDistance()
WeightProviderDescriptorRegistryImpl.createStandaloneInstance()
.public EditionDistance(WeightProvider.Descriptor.Registry registry)
registry
- The registry of weight providers to use in this Edition Distance.public double distance(Comparison inProgress, EObject a, EObject b)
distance
in interface ProximityEObjectMatcher.DistanceFunction
inProgress
- the comparison being processed right now. This might be used for the distance to
retrieve other matches for instance.a
- first object.b
- second object.public boolean areIdentic(Comparison inProgress, EObject a, EObject b)
areIdentic
in interface ProximityEObjectMatcher.DistanceFunction
inProgress
- the comparison being processed right now. This might be used for the distance to
retrieve other matches for instance.a
- first object.b
- second object.public static EditionDistance.Builder builder()
public double getThresholdAmount(EObject eObj)
protected double getThresholdRatio(int nbFeatures)
nbFeatures
- the nb of features which should be considerd to compute the amount.
Copyright (c) 2006, 2014 Obeo and others. All rights reserved.