
public final class Util extends Object
de.lmu.ifi.dbs.elki.utilities| Modifier and Type | Class and Description | 
|---|---|
private static class  | 
Util.ForwardComparator
Regular comparator. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
private static Comparator<?> | 
FORWARD
Static instance. 
 | 
private static long | 
HASHPRIME
Prime number used in hash code computation. 
 | 
| Modifier | Constructor and Description | 
|---|---|
private  | 
Util()
Fake constructor: do not instantiate. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static <T> Comparator<T> | 
forwardOrder()
Compare two objects, forward. 
 | 
static int | 
mixHashCodes(int... hash)
Mix multiple hashcodes into one. 
 | 
static int | 
mixHashCodes(int hash)
Deprecated.  
 | 
static int | 
mixHashCodes(int hash1,
            int hash2)
Mix multiple hashcodes into one. 
 | 
static int | 
mixHashCodes(int hash1,
            int hash2,
            int hash3)
Mix multiple hashcodes into one. 
 | 
static BitSet | 
randomBitSet(int cardinality,
            int capacity,
            Random random)
Creates a new BitSet of fixed cardinality with randomly set bits. 
 | 
private static final long HASHPRIME
private static final Comparator<?> FORWARD
public static BitSet randomBitSet(int cardinality, int capacity, Random random)
cardinality - the cardinality of the BitSet to createcapacity - the capacity of the BitSet to create - the randomly
        generated indices of the bits set to true will be uniformly
        distributed between 0 (inclusive) and capacity (exclusive)random - a Random Object to create the sequence of indices set to true
        - the same number occurring twice or more is ignored but the already
        selected bit remains true@Deprecated public static int mixHashCodes(int hash)
hash - Single Hashcodes to "mix"public static int mixHashCodes(int hash1,
               int hash2)
hash1 - First hashcode to mixhash2 - Second hashcode to mixpublic static int mixHashCodes(int hash1,
               int hash2,
               int hash3)
hash1 - First hashcode to mixhash2 - Second hashcode to mixhash3 - Third hashcode to mixpublic static int mixHashCodes(int... hash)
hash - Hashcodes to mixpublic static <T> Comparator<T> forwardOrder()
Collections.reverseOrder() for a reverse comparator.T - Object type