com.kpro.algorithm
Class DistanceMetric

java.lang.Object
  extended by com.kpro.algorithm.DistanceMetric
Direct Known Subclasses:
bitmapDistance, bitmapDistanceWisOne, Bitmapwithdata

public abstract class DistanceMetric
extends java.lang.Object

An abstract Distance metric class. A DistanceMetric interface has to contain 3 methods method for calculation of distance between Recipients, Purposes and Retentions between cases and distance for data-type string

Version:
160911.1
Author:
dimitryk

Field Summary
(package private)  java.lang.String[] extraArgs
           
(package private)  java.util.Properties weightsConfig
           
 
Constructor Summary
protected DistanceMetric(java.util.Properties weights, java.lang.String[] extraArgs)
           
 
Method Summary
abstract  double getTotalDistance(PolicyObject a, PolicyObject b)
          Calculates total distance between two policies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

weightsConfig

java.util.Properties weightsConfig

extraArgs

java.lang.String[] extraArgs
Constructor Detail

DistanceMetric

protected DistanceMetric(java.util.Properties weights,
                         java.lang.String[] extraArgs)
Method Detail

getTotalDistance

public abstract double getTotalDistance(PolicyObject a,
                                        PolicyObject b)
Calculates total distance between two policies

Parameters:
a - input PolicyObject
b - input PolicyObject
Returns:
double 0 if cases are similar and positive integer if they are not