Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.data
Class BitSetComparator

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.data.BitSetComparator
All Implemented Interfaces:
Comparator<BitSet>

public class BitSetComparator
extends Object
implements Comparator<BitSet>

BitSetComparator to compare BitSets.

Author:
Arthur Zimek

Constructor Summary
BitSetComparator()
           
 
Method Summary
 int compare(BitSet b1, BitSet b2)
          Compares to BitSets b1 and b2.
 
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

BitSetComparator

public BitSetComparator()
Method Detail

compare

public int compare(BitSet b1,
                   BitSet b2)
Compares to BitSets b1 and b2. b1 is less than b2 if it is smaller and vice versa. If b1 and b2 are of equal size, the BitSet will be treated as less than the other, that has first a smaller index of a set bit.

Specified by:
compare in interface Comparator<BitSet>
See Also:
Comparator.compare(Object, Object)

Release 0.1 (2008-07-10_1838)