at.tuwien.ifs.somtoolbox.clustering.functions
Class DoubleVector2DDistance

java.lang.Object
  extended by 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

Field Summary
protected  DistanceMetric metric
           
 
Fields inherited from interface at.tuwien.ifs.somtoolbox.clustering.functions.ClusterElementFunctions
DF
 
Constructor Summary
DoubleVector2DDistance(DistanceMetric metric)
           
 
Method Summary
 double distance(double[] vector1, double[] vector2)
           
 double distance(DoubleVector2D element1, DoubleVector2D element2)
           
 int getIndexOfLineClosestToMean(Cluster<? extends DoubleVector2D> elements)
           
 DoubleVector2D meanObject(Cluster<? extends DoubleVector2D> elements)
           
 String toString(Cluster<? extends DoubleVector2D> elements)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

metric

protected DistanceMetric metric
Constructor Detail

DoubleVector2DDistance

public DoubleVector2DDistance(DistanceMetric metric)
Method Detail

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>