X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=srcjar%2Ffr%2Forsay%2Flri%2Fvarna%2Fmodels%2Ftreealign%2FTreeAlignLabelDistanceAsymmetric.java;fp=srcjar%2Ffr%2Forsay%2Flri%2Fvarna%2Fmodels%2Ftreealign%2FTreeAlignLabelDistanceAsymmetric.java;h=91aff2f96d19362af05205b3d04350f2f29bbf34;hb=65740880573a48adc758bec3939ece9d9ae104dd;hp=0000000000000000000000000000000000000000;hpb=71aa78b8a7d54e5aeb6b278310dfd735efb77477;p=jalview.git diff --git a/srcjar/fr/orsay/lri/varna/models/treealign/TreeAlignLabelDistanceAsymmetric.java b/srcjar/fr/orsay/lri/varna/models/treealign/TreeAlignLabelDistanceAsymmetric.java new file mode 100644 index 0000000..91aff2f --- /dev/null +++ b/srcjar/fr/orsay/lri/varna/models/treealign/TreeAlignLabelDistanceAsymmetric.java @@ -0,0 +1,18 @@ +package fr.orsay.lri.varna.models.treealign; + +public interface TreeAlignLabelDistanceAsymmetric { + /** + * Returns the substitution cost between v1 and v2. + * We use the convention that a null reference is a blank, + * ie. f(x, null) is the cost of deleting x + * and f(null, x) is the cost of inserting x. + * We won't use f(null, null). + * We suppose f is such that: + * f(x,x) = 0 + * 0 <= f(x,y) < +infinity + * You may also want to have the triangle inequality, + * although the alignment algorithm does not require it: + * f(x,z) <= f(x,y) + f(y,z) + */ + public double f(ValueType1 x, ValueType2 y); +}