org.knime.base.node.mine.cluster.hierarchical.distfunctions
Class EuclideanDist

java.lang.Object
  extended by org.knime.base.node.mine.cluster.hierarchical.distfunctions.MinkowskiDist
      extended by org.knime.base.node.mine.cluster.hierarchical.distfunctions.EuclideanDist
All Implemented Interfaces:
Serializable, DistanceFunction

public class EuclideanDist
extends MinkowskiDist

Calculates the distance for two data rows based on the euclidean distance.

Author:
Christoph Sieb, University of Konstanz
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.knime.base.node.mine.cluster.hierarchical.distfunctions.DistanceFunction
DistanceFunction.Names
 
Field Summary
static EuclideanDist EUCLIDEAN_DISTANCE
          An instance of this distance function.
 
Constructor Summary
protected EuclideanDist()
          Creates a Euclidean distance object from an Minkowski distance which means the power is two.
 
Method Summary
 double calcDistance(DataRow firstDataRow, DataRow secondDataRow, int[] includedCols)
          Calculates the distance between two data rows based on the Euclidean distance.
 String toString()
          Returns the String representation of this distance function.
 
Methods inherited from class org.knime.base.node.mine.cluster.hierarchical.distfunctions.MinkowskiDist
equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EUCLIDEAN_DISTANCE

public static final EuclideanDist EUCLIDEAN_DISTANCE
An instance of this distance function.

Constructor Detail

EuclideanDist

protected EuclideanDist()
Creates a Euclidean distance object from an Minkowski distance which means the power is two.

Method Detail

calcDistance

public double calcDistance(DataRow firstDataRow,
                           DataRow secondDataRow,
                           int[] includedCols)
Calculates the distance between two data rows based on the Euclidean distance.

Specified by:
calcDistance in interface DistanceFunction
Overrides:
calcDistance in class MinkowskiDist
Parameters:
firstDataRow - the first data row used to calculate the distance
secondDataRow - the second data row used to calculate the distance
includedCols - the columns to include into the distance calculation
Returns:
the distance of the two rows

toString

public String toString()
Returns the String representation of this distance function.

Overrides:
toString in class MinkowskiDist
Returns:
the String representation


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.