fr.orsay.lri.varna.models.treealign
Class ExampleDistance2
java.lang.Object
fr.orsay.lri.varna.models.treealign.ExampleDistance2
- All Implemented Interfaces:
- TreeAlignLabelDistanceAsymmetric<RNANodeValue2,RNANodeValue2>, TreeAlignLabelDistanceSymmetric<RNANodeValue2>
public class ExampleDistance2
- extends Object
- implements TreeAlignLabelDistanceSymmetric<RNANodeValue2>
This distance is such that a substitution costs nothing.
- Author:
- Raphael Champeimont
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExampleDistance2
public ExampleDistance2()
f
public double f(RNANodeValue2 v1,
RNANodeValue2 v2)
- Description copied from 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)
- Specified by:
f
in interface TreeAlignLabelDistanceAsymmetric<RNANodeValue2,RNANodeValue2>