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

java.lang.Object
  extended by org.knime.base.node.mine.mds.distances.DistanceManagerFactory

public final class DistanceManagerFactory
extends Object

Author:
Kilian Thiel, University of Konstanz

Field Summary
static String COS_DIST
          Flag for cosinus distance.
static String EUCLIDEAN_DIST
          Flag for euclidean distance.
static String MANHATTAN_DIST
          Flag for korrelation distance.
 
Method Summary
static DistanceManager createDistanceManager(String distance)
          Creates a new instance extending the DistanceManager interface.
static DistanceManager createDistanceManager(String distance, boolean fuzzy)
          Creates a new instance extending the DistanceManager interface.
static DistanceManager createDistanceManager(String distance, boolean fuzzy, boolean ignoreCase)
          Creates a new instance extending the DistanceManager interface.
static DistanceManager createDistanceManager(String distance, boolean fuzzy, double offset, boolean ignoreType)
          Creates a new instance extending the DistanceManager interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EUCLIDEAN_DIST

public static final String EUCLIDEAN_DIST
Flag for euclidean distance.

See Also:
Constant Field Values

COS_DIST

public static final String COS_DIST
Flag for cosinus distance.

See Also:
Constant Field Values

MANHATTAN_DIST

public static final String MANHATTAN_DIST
Flag for korrelation distance.

See Also:
Constant Field Values
Method Detail

createDistanceManager

public static final DistanceManager createDistanceManager(String distance,
                                                          boolean fuzzy,
                                                          double offset,
                                                          boolean ignoreType)
Creates a new instance extending the DistanceManager interface. According to the kind of distance a particular DistanceManager is returned. If you want to compute i.e. euclidean distances, then use DistanceManagerFactory.EUCLIDEAN_DIST as distance parameter and the EuclideanDistanceManager is returned. If an unvalid kind of distance is given null will be returned. The fuzzy parameter specifies if the created DistanceManager will compute distances between FuzzyIntervalCells or DataCells containing numbers. The offset parameter specifies a particular offset used i.e. by the CosinusDistanceManager.

Parameters:
distance - Specifies the concrete DistanceManager implementation to be returned.
fuzzy - If true the DistanceManager will compute distances between FuzzyIntervalCells.
offset - A particular offset use by i.e. the CosinusDistanceManager
ignoreType - If set true the type (fuzzy or number) will be ignored. When dealing with fuzzy values the center of gravity is used, otherwise the numerical value.
Returns:
A particular DistanceManager, specified by the distance parameter.

createDistanceManager

public static final DistanceManager createDistanceManager(String distance)
Creates a new instance extending the DistanceManager interface. According to the kind of distance a particular DistanceManager is returned. If you want to compute for instance euclidean distances, then use DistanceManagerFactory.EUCLIDEAN_DIST as distance parameter and the EuclideanDistanceManager is returned. If an unvalid kind of distance is given null will be returned. The returned DistanceManager computes distances between DataCells containing numbers, not FuzzyIntervalCells. The offset is set to 1 by default. The types will not be ignored by default.

Parameters:
distance - Specifies the concrete DistanceManager implementation to be returned.
Returns:
A particular DistanceManager, specified by the distance parameter.

createDistanceManager

public static final DistanceManager createDistanceManager(String distance,
                                                          boolean fuzzy)
Creates a new instance extending the DistanceManager interface. According to the kind of distance a particular DistanceManager is returned. If you want to compute for instance euclidean distances, then use DistanceManagerFactory.EUCLIDEAN_DIST as distance parameter and the EuclideanDistanceManager is returned. If an unvalid kind of distance is given null will be returned. The fuzzy parameter specifies if the created DistanceManager will compute distances between FuzzyIntervalCells or DataCells containing numbers. The offset is set to 1 by default.

Parameters:
distance - Specifies the concrete DistanceManager implementation to be returned.
fuzzy - If true the DistanceManager will compute distances between FuzzyIntervalCells.
Returns:
A particular DistanceManager, specified by the distance parameter.

createDistanceManager

public static final DistanceManager createDistanceManager(String distance,
                                                          boolean fuzzy,
                                                          boolean ignoreCase)
Creates a new instance extending the DistanceManager interface. According to the kind of distance a particular DistanceManager is returned. If you want to compute for instance euclidean distances, then use DistanceManagerFactory.EUCLIDEAN_DIST as distance parameter and the EuclideanDistanceManager is returned. If an unvalid kind of distance is given null will be returned. The fuzzy parameter specifies if the created DistanceManager will compute distances between FuzzyIntervalCells or DataCells containing numbers. The offset is set to 1 by default.

Parameters:
distance - Specifies the concrete DistanceManager implementation to be returned.
fuzzy - If true the DistanceManager will compute distances between FuzzyIntervalCells.
ignoreCase - If trueThe type (fuzzy or number) will be ignored. When dealing with fuzzy values the center of gravity is used, otherwise the numerical value.
Returns:
A particular DistanceManager, specified by the distance parameter.


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.