org.gcube.indexmanagement.featureindexlibrary.commons
Class DistanceCalculation

java.lang.Object
  extended by org.gcube.indexmanagement.featureindexlibrary.commons.DistanceCalculation

public class DistanceCalculation
extends Object

Distance computations

Author:
UoA

Constructor Summary
DistanceCalculation()
           
 
Method Summary
static float distance(float[] vector1, float[] vector2, float threshold, FIEnums.DistanceTypes distanceMeasure)
          Distance function
static float distance(float[] vector1, float[] vector2, float threshold, FIEnums.DistanceTypes distanceMeasure, float[] weights)
          Distance function
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistanceCalculation

public DistanceCalculation()
Method Detail

distance

public static float distance(float[] vector1,
                             float[] vector2,
                             float threshold,
                             FIEnums.DistanceTypes distanceMeasure)
                      throws Exception
Distance function

Parameters:
vector1 - the first vector
vector2 - the second vector
threshold - The threshold
distanceMeasure - The distance measure to use
Returns:
The distance measure
Throws:
Exception - An error

distance

public static float distance(float[] vector1,
                             float[] vector2,
                             float threshold,
                             FIEnums.DistanceTypes distanceMeasure,
                             float[] weights)
                      throws Exception
Distance function

Parameters:
vector1 - the first vector
vector2 - the second vector
threshold - The threshold
distanceMeasure - The distance measure to use
weights - weight per dimention
Returns:
The distance measure
Throws:
Exception - An error


Copyright © 2013. All Rights Reserved.