at.tuwien.ifs.somtoolbox.clustering.functions
Class DoubleVector2DDistance
java.lang.Object
at.tuwien.ifs.somtoolbox.clustering.functions.DoubleVector2DDistance
- All Implemented Interfaces:
- ClusterElementFunctions<DoubleVector2D>
public class DoubleVector2DDistance
- extends Object
- implements ClusterElementFunctions<DoubleVector2D>
Implements functions needed for clustering of double arrays.
- Version:
- $Id: DoubleVector2DDistance.java 3927 2010-11-09 12:04:54Z mayer $
- Author:
- Rudolf Mayer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
metric
protected DistanceMetric metric
DoubleVector2DDistance
public DoubleVector2DDistance(DistanceMetric metric)
distance
public double distance(DoubleVector2D element1,
DoubleVector2D element2)
- Specified by:
distance
in interface ClusterElementFunctions<DoubleVector2D>
distance
public double distance(double[] vector1,
double[] vector2)
meanObject
public DoubleVector2D meanObject(Cluster<? extends DoubleVector2D> elements)
- Specified by:
meanObject
in interface ClusterElementFunctions<DoubleVector2D>
getIndexOfLineClosestToMean
public int getIndexOfLineClosestToMean(Cluster<? extends DoubleVector2D> elements)
toString
public String toString(Cluster<? extends DoubleVector2D> elements)
- Specified by:
toString
in interface ClusterElementFunctions<DoubleVector2D>