1 package fr.orsay.lri.varna.models.treealign;
3 public interface TreeAlignLabelDistanceAsymmetric<ValueType1, ValueType2> {
5 * Returns the substitution cost between v1 and v2.
6 * We use the convention that a null reference is a blank,
7 * ie. f(x, null) is the cost of deleting x
8 * and f(null, x) is the cost of inserting x.
9 * We won't use f(null, null).
10 * We suppose f is such that:
12 * 0 <= f(x,y) < +infinity
13 * You may also want to have the triangle inequality,
14 * although the alignment algorithm does not require it:
15 * f(x,z) <= f(x,y) + f(y,z)
17 public double f(ValueType1 x, ValueType2 y);