org.knime.base.node.mine.mds.distances
Class ManhattanDistanceManager

java.lang.Object
  extended by org.knime.base.node.mine.mds.distances.ManhattanDistanceManager
All Implemented Interfaces:
DistanceManager

public class ManhattanDistanceManager
extends Object
implements DistanceManager

Author:
Kilian Thiel, University of Konstanz

Constructor Summary
ManhattanDistanceManager()
          Creates instance of ManhattanDistanceManager, which computes the manhattan distances between rows and cells.
ManhattanDistanceManager(boolean fuzzy)
          Creates instance of ManhattanDistanceManager, which computes Manhattan distances between DataRows and SotaTreeCells.
 
Method Summary
 double getDistance(DataPoint point1, DataPoint point2)
          Returns the distance between the given DataPoints, point1 and point2.
 double getDistance(DataRow row1, DataRow row2)
          Returns the distance between the given DataRows, row1 and row2.
 boolean getIgnoreType()
           
 String getType()
          
 void setIgnoreType(boolean ignoreType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManhattanDistanceManager

public ManhattanDistanceManager(boolean fuzzy)
Creates instance of ManhattanDistanceManager, which computes Manhattan distances between DataRows and SotaTreeCells. If fuzzy is set true, only fuzzy columns are considered, if false only number columns.

Parameters:
fuzzy - if true only fuzzy data is respected, if false only number data

ManhattanDistanceManager

public ManhattanDistanceManager()
Creates instance of ManhattanDistanceManager, which computes the manhattan distances between rows and cells. The type (fuzzy or number) will be ignored. When dealing with fuzzy values the center of gravity is used, otherwise the numerical value.

Method Detail

getDistance

public double getDistance(DataRow row1,
                          DataRow row2)
Returns the distance between the given DataRows, row1 and row2. The distance metric is up to the concrete implementation.

Specified by:
getDistance in interface DistanceManager
Parameters:
row1 - First DataRow to compute distance.
row2 - Second DataRow to compute distance.
Returns:
The distance between given DataRows.

getDistance

public double getDistance(DataPoint point1,
                          DataPoint point2)
Returns the distance between the given DataPoints, point1 and point2. The distance metric is up to the concrete implementation.

Specified by:
getDistance in interface DistanceManager
Parameters:
point1 - First DataPoint to compute distance.
point2 - Second DataPoint to compute distance.
Returns:
The distance between given DataRows.

getType

public String getType()

Specified by:
getType in interface DistanceManager
Returns:
The type of the DistanceManager. See DistanceManagerFactory for valid types.
See Also:
#COS_DIST, #EUCLIDEAN_DIST, #MANHATTAN_DIST

getIgnoreType

public boolean getIgnoreType()
Returns:
the ignoreType

setIgnoreType

public void setIgnoreType(boolean ignoreType)
Parameters:
ignoreType - the ignoreType to set


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.