org.knime.base.node.mine.cluster.hierarchical.distfunctions
Class MinkowskiDist
java.lang.Object
org.knime.base.node.mine.cluster.hierarchical.distfunctions.MinkowskiDist
- All Implemented Interfaces:
- Serializable, DistanceFunction
- Direct Known Subclasses:
- EuclideanDist, ManhattanDist
public class MinkowskiDist
- extends Object
- implements DistanceFunction
Calculates the distance for two data rows based on the Minkowski distance.
- Author:
- som-team, University of Konstanz
- See Also:
- Serialized Form
Constructor Summary |
MinkowskiDist(int p)
Creates a Minkowski distance object from an Minkowski distance. |
MinkowskiDist
public MinkowskiDist(int p)
- Creates a Minkowski distance object from an Minkowski distance.
- Parameters:
p
- the power for this Minkowski distance
calcDistance
public double calcDistance(DataRow firstDataRow,
DataRow secondDataRow,
int[] includedCols)
- Calculates the distance between two data rows based on the
Minkowski distance.
- Specified by:
calcDistance
in interface DistanceFunction
- Parameters:
firstDataRow
- the first data row used to calculate the distancesecondDataRow
- the second data row used to calculate the distanceincludedCols
- the columns to include into the calculation
- Returns:
- the distance of the two rows
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
- Parameters:
o
- The object to compare with.
- Returns:
- true if both instances (classes) are the same.
hashCode
public int hashCode()
-
- Overrides:
hashCode
in class Object
toString
public String toString()
- Returns the String representation of this distance function.
- Overrides:
toString
in class Object
- 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.