de.lmu.ifi.dbs.elki.data
Class BitSetComparator
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BitSetComparator
public BitSetComparator()
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)