uk.ac.ic.doc.automed.matching
Class BidirectionalDegree

java.lang.Object
  extended by uk.ac.ic.doc.automed.matching.BidirectionalDegree

public class BidirectionalDegree
extends java.lang.Object

The BidirectionalDegree class represents the bidirectional similarity degrees for two schema elements. For each pair of schema elements, a BidirectionalDegree object can be constructed to store the similarity degrees produced by the bidirectional comparison of the elements. These are the normalized "forward" and "backward" similarity degrees, i.e. each has a range {0..1}.


Constructor Summary
BidirectionalDegree(double forward, double backward)
          Constructs a BidirectionalDegree object based on the specified forward and backward similarity degrees.
 
Method Summary
 void add(BidirectionalDegree bd)
          Adds the specified bidirectional degree to the current degree.
 int compareTo(BidirectionalDegree d)
           
 void divide(BidirectionalDegree bd)
          Divides the specified bidirectional degree from the current degree.
 boolean equals(BidirectionalDegree d)
          Returns true if this degree is equal to the specified degree.
 double getBackwardDegree()
          Returns the backward similarity degree.
 double getForwardDegree()
          Returns the forward similarity degree.
 boolean isNaN()
          Returns true if one of the similarity degrees is not a number.
 void multiply(BidirectionalDegree bd)
          Multiplies the specified bidirectional degree to the current degree.
 boolean overFunction(double c)
          Returns true if the following is true: forward+backward-c>=0
 void setBackwardDegree(double backward)
           
 void setForwardDegree(double forward)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BidirectionalDegree

public BidirectionalDegree(double forward,
                           double backward)
Constructs a BidirectionalDegree object based on the specified forward and backward similarity degrees.

Parameters:
forward - the forward similarity degree
backward - the backward similarity degree
Method Detail

isNaN

public boolean isNaN()
Returns true if one of the similarity degrees is not a number.

Returns:
true if one of the similarity degrees is not a number, false otherwise.

getForwardDegree

public double getForwardDegree()
Returns the forward similarity degree.

Returns:
the forward similarity degree.

getBackwardDegree

public double getBackwardDegree()
Returns the backward similarity degree.

Returns:
the backward similarity degree.

setForwardDegree

public void setForwardDegree(double forward)

setBackwardDegree

public void setBackwardDegree(double backward)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

add

public void add(BidirectionalDegree bd)
Adds the specified bidirectional degree to the current degree. The current degree changes to store the sum of the degrees.

Parameters:
bd - the bidirectional degree to be added

divide

public void divide(BidirectionalDegree bd)
Divides the specified bidirectional degree from the current degree. The current degree changes to store the result of the division.

Parameters:
bd - the bidirectional degree to divide

multiply

public void multiply(BidirectionalDegree bd)
Multiplies the specified bidirectional degree to the current degree. The current degree changes to store the product of the degrees.

Parameters:
bd - the bidirectional degree to multiply

overFunction

public boolean overFunction(double c)
Returns true if the following is true: forward+backward-c>=0

Returns:
true if the following is true: forward+backward-c>=0, false otherwise.

equals

public boolean equals(BidirectionalDegree d)
Returns true if this degree is equal to the specified degree.

Returns:
true if this degree is equal to the specified degree.

compareTo

public int compareTo(BidirectionalDegree d)