org.knime.core.data
Class FuzzyIntervalValueComparator

java.lang.Object
  extended by org.knime.core.data.DataValueComparator
      extended by org.knime.core.data.FuzzyIntervalValueComparator
All Implemented Interfaces:
Comparator<DataCell>

public class FuzzyIntervalValueComparator
extends DataValueComparator

Comparator returned by the FuzzyIntervalValue datacell type.

Author:
Michael Berthold, University of Konstanz
See Also:
FuzzyIntervalValue.FuzzyIntervalUtilityFactory

Constructor Summary
FuzzyIntervalValueComparator()
           
 
Method Summary
protected  int compareDataValues(DataValue v1, DataValue v2)
          The compare function called by the abstract DataValueComparator class.
 
Methods inherited from class org.knime.core.data.DataValueComparator
compare
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

FuzzyIntervalValueComparator

public FuzzyIntervalValueComparator()
Method Detail

compareDataValues

protected int compareDataValues(DataValue v1,
                                DataValue v2)
The compare function called by the abstract DataValueComparator class. The comparison is based on the border values returned by the FuzzyIntervalValue.get{Min,Max}{Core,Support}() methods. Note that comparing fuzzy intervals is far from trivial - we base the comparison used here on the center of gravities of the fuzzy sets. Do not call this method directly. Use DataValueComparator.compare(DataCell, DataCell) instead.

Specified by:
compareDataValues in class DataValueComparator
Parameters:
v1 - the first DataValue to compare the other with
v2 - the other DataValue to compare the first with
Returns:
return -1 if v1 is smaller than v2, +1 if v1 is larger than v2, 0 otherwise
See Also:
#compareDataValues(DataValue, DataValue)


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.