nz.ac.waikato.mcennis.rat.graph.algorithm.reusablecores.distance
Class DotProductDistance

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.graph.algorithm.reusablecores.distance.DotProductDistance
All Implemented Interfaces:
DistanceFunction

public class DotProductDistance
extends java.lang.Object
implements DistanceFunction

distance measure of dot-product of the two vectors as vectors in a Euclidean space.


Constructor Summary
DotProductDistance()
           
 
Method Summary
 double distance(DataVector inst1, DataVector inst2)
          Return the distance between the two given vectors as a double.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DotProductDistance

public DotProductDistance()
Method Detail

distance

public double distance(DataVector inst1,
                       DataVector inst2)
Description copied from interface: DistanceFunction
Return the distance between the two given vectors as a double.

Specified by:
distance in interface DistanceFunction
Parameters:
inst1 - left data vector
inst2 - right data vector
Returns:
distance by a given metric