Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.utilities
Class IDDoublePairComparatorDescDouble

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.IDDoublePairComparatorDescDouble
All Implemented Interfaces:
Comparator<IDDoublePair>

public class IDDoublePairComparatorDescDouble
extends Object
implements Comparator<IDDoublePair>

A comparator for IDDoublePairs. The comparator ensures a sorting in descending double values of the according IDDoublePairs when using Arrays.sort

Author:
Peer Kröger

Constructor Summary
IDDoublePairComparatorDescDouble()
           
 
Method Summary
 int compare(IDDoublePair o1, IDDoublePair o2)
          Implements the compare method such that a sorting is in descending order.
 
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

IDDoublePairComparatorDescDouble

public IDDoublePairComparatorDescDouble()
Method Detail

compare

public int compare(IDDoublePair o1,
                   IDDoublePair o2)
Implements the compare method such that a sorting is in descending order.

Specified by:
compare in interface Comparator<IDDoublePair>
Parameters:
o1 - the first object of type IDDoublePair
o2 - the second object of type IDDoublePair
Returns:
1, -1, and zero if the double value of the first IDDoublePair is greater, less or equal to the double value of the second one.

Release 0.1 (2008-07-10_1838)