fr.orsay.lri.varna.models.templates
Class RNANodeValue2TemplateDistance

java.lang.Object
  extended by fr.orsay.lri.varna.models.templates.RNANodeValue2TemplateDistance
All Implemented Interfaces:
TreeAlignLabelDistanceAsymmetric<RNANodeValue2,RNANodeValueTemplate>

public class RNANodeValue2TemplateDistance
extends Object
implements TreeAlignLabelDistanceAsymmetric<RNANodeValue2,RNANodeValueTemplate>

Distance between an RNANodeValue2 and an RNANodeValueTemplate.

Author:
Raphael Champeimont

Constructor Summary
RNANodeValue2TemplateDistance()
           
 
Method Summary
 double delete(RNANodeValue2 v)
           
 double f(RNANodeValue2 v1, RNANodeValueTemplate v2)
          Returns the substitution cost between v1 and v2.
 double insert(RNANodeValueTemplate v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RNANodeValue2TemplateDistance

public RNANodeValue2TemplateDistance()
Method Detail

delete

public double delete(RNANodeValue2 v)

insert

public double insert(RNANodeValueTemplate v)

f

public double f(RNANodeValue2 v1,
                RNANodeValueTemplate 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,RNANodeValueTemplate>