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

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.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.
 DotProductDistance prototype()
           
 
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

prototype

public DotProductDistance prototype()
Specified by:
prototype in interface DistanceFunction

Get Relational Analysis Toolkit at SourceForge.net. Fast, secure and Free Open Source software downloads